Length of a Matrix

Length of a Matrix - Messages

#1 Posted: 2019/2/27 20:41:15
Alvaro

Alvaro

1,078 likes in 1,749 posts.

Group: User

Hi. Is this the expected behavior?

append.gif

Append.sm (6.87 KiB) downloaded 785 time(s).

I hope not. I expect A' = [1 2 3 4]

Best regards.
Alvaro.
#2 Posted: 2019/2/27 21:32:07
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

Alvaro: maybe like this ?

Append.PNG
#3 Posted: 2019/2/27 21:53:45
Alvaro

Alvaro

1,078 likes in 1,749 posts.

Group: User

Hi Jean. Nope, maybe more like this:

append.gif

BTW, this is a workaround. I expect this result but for the previous syntax.

Best regards.
Alvaro.
#4 Posted: 2019/2/27 22:20:41
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

Wrote

Hi Jean. Nope, maybe more like this:


You just append, my code inserts wherever needed.
My mistake I named Append(,,,)
OK, you are imitating MCD.
Simpler Append: transpose the row, stack, re-transpose.

AppendStack.PNG


#5 Posted: 2019/2/27 22:25:09
Alvaro

Alvaro

1,078 likes in 1,749 posts.

Group: User

Wrote


...
OK, you are imitating MCD.
...



I'm trying to imitate Wolfram's Mathematica Append.
#6 Posted: 2019/2/28 01:59:51
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

Wrote

I'm trying to imitate Wolfram's Mathematica Append.


Not that much miraculous Mathematica 4.0
Mathcad APENDPRN was almost never used.
Useful to compact/file a data set with wisely
collected the fitting coefficients.
On that application, Smath is far superior ... Explain
Smath can save same stuff + the formula ... WOW !

Saludad Alvaro [is that correct ?]

Page24 Alvaro.sm (15.01 KiB) downloaded 908 time(s).



#7 Posted: 2019/2/28 05:48:34
Davide Carpi

Davide Carpi

1,435 likes in 2,913 posts.

Group: Moderator

Yes it is correct, or at least it conforms with the general approach of the program (vectors are single column matrices, anything else is a matrix). You might see it better in a 2 rows matrix:

2019-02-28 09_38_57-Window.png
The new indices are added expanding the matrix vertically; there is no special case for single-row matrices.

For your task, one way could be this:

2019-02-28 09_34_31-Window.png

Or this:

2019-02-28 09_46_40-Window.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
3 users liked this post
frapuano 2019/2/28 06:06:00, Alvaro 2019/2/28 06:07:00, NDTM Amarasekera 2019/2/28 12:13:00
#8 Posted: 2019/2/28 13:22:34
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

...
JoBlo.PNG
#9 Posted: 2019/2/28 14:42:13
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

... append this Jacobian matrix.

AppendJacob.PNG
#10 Posted: 2019/2/28 15:05:51
Alvaro

Alvaro

1,078 likes in 1,749 posts.

Group: User

Wrote


Saludad Alvaro [is that correct ?]



Close. Correct it's Saludos Jean.

Wrote

Yes it is correct, or at least it conforms with the general approach of the program (vectors are single column matrices, anything else is a matrix). You might see it better in a 2 rows matrix:



Thanks for the explain. You give to me the rule for understand the result. Just as comment, matlab don't follow that, and gives this results:

File not found. File not found.
Best regards.
Alvaro.
#11 Posted: 2019/3/1 01:03:18
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

Wrote

Just as comment, matlab don't follow that, and gives this results:


What Matlab does Smath does as well with lot more user specifics.
Matlab => MDA [Muliti Dimensional Array]
Mathematica => Cell Array
They just have their system. I can do whatever from this example
and very quick too, just few more modules.

MDA_1.bmp


  • New Posts
  • No New Posts