matrix (table)

matrix (table) - How to add matrix element - Messages

#1 Posted: 9/28/2021 7:57:09 AM
Adam Puczyński

Adam Puczyński

0 likes in 4 posts.

Group: User

I'm newbee, sorry. I have problem. Help me?
How to add specific element of matrix or table to calculations?
#2 Posted: 9/28/2021 8:14:15 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

How to add specific element of matrix or table to calculations?


If you have your matrix from calculation,
simply address the element(s) with new value.
Cheers ... Jean
#3 Posted: 9/28/2021 8:37:33 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

2021-09-28 13_37_13-SMath Solver - [Worksheet1_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 9/28/2021 9:17:41 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... observe the empty place holder is a / operator.

Matrix Advanced.PNG
#5 Posted: 9/28/2021 10:00:40 AM
Adam Puczyński

Adam Puczyński

0 likes in 4 posts.

Group: User

Thank You Jean, but rather, I meant to extract a specific element from the matrix. Sorry but my English is very poor.
Adam
#6 Posted: 9/28/2021 11:15:31 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thank You Jean, but rather, I meant to extract a specific element from the matrix.


There are many more ways ... like skinning a cat.
Cheers ... Jean.

Matrix Extract.PNG

#7 Posted: 9/28/2021 1:28:22 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Wrote

Thank You Jean, but rather, I meant to extract a specific element from the matrix. Sorry but my English is very poor.
Adam



You can press [ when a variable is selected to write in the worksheet a "vector element" placeholder to access an element of a vector/matrix.

Indices are "base 1", therefore any value from 1 to the number of elements is accepted.

A single placeholder in matrices reads the values by linear indexing that is reading each element of a row before going to the next one).

You can add a second placeholder for accessing rows and columns coordinates by typing an argument separator (usually a comma or a semicolon) when the first placeholder is selected.


[ is a shortcut for the function el(1), so it is possible to create the same thing with the following sequence

write el
press TAB KEY
write matrix name
press RIGHT ARROW KEY
write 1st index number or name
[optional]
press ARGUMENT SEPARATOR KEY
write 2nd index number or name
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#8 Posted: 9/28/2021 4:21:01 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. There are many different ways to access the elements of an array. This list is not exhaustive, and does not include the submatrix function.

M.sm (10 KiB) downloaded 38 time(s).

Clipboard01.jpg

Best regards.
Alvaro
2 users liked this post
sergio 9/28/2021 5:24:00 PM, fedeghi 9/29/2021 3:24:00 AM
#9 Posted: 9/30/2021 6:22:06 AM
Adam Puczyński

Adam Puczyński

0 likes in 4 posts.

Group: User

Hay everybody.
Thank you so much, especially for the examples (Jean, Davide, Razonar). It brightened up a lot of problems for me regarding matrices. Once again, thank you very much. One more thing, how do you write the range of elements in an array? Regards Adam
#10 Posted: 9/30/2021 7:53:25 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

One more thing, how do you write the range of elements in an array? Regards Adam


Your question is not clear w/o an example.
If not confidential, please attach the document.
Attached, a typical example @ the red arrow.
Cheers ... Jean.

2D Plot Multitrace [Gaussian] QUICK.sm (26 KiB) downloaded 43 time(s).

#11 Posted: 9/30/2021 1:37:31 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

... One more thing, how do you write the range of elements in an array? Regards Adam



Use vector element

Clipboard05.jpg

or matrix element

Clipboard07.jpg

and then put a range (with 2 or 3 arguments) in the index placeholder

Clipboard08.jpg

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts