Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Razonar  
#1 Posted : 28 February 2019 02:41:15(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. Is this the expected behavior?

append.gif

Append.sm (7kb) downloaded 16 time(s).

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

Best regards.
Alvaro.

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 28 February 2019 03:32:07(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Alvaro: maybe like this ?

Append.PNG
Offline Razonar  
#3 Posted : 28 February 2019 03:53:45(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
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.
Offline Jean Giraud  
#4 Posted : 28 February 2019 04:20:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Razonar Go to Quoted Post
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


Offline Razonar  
#5 Posted : 28 February 2019 04:25:09(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post

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


I'm trying to imitate Wolfram's Mathematica Append.
Offline Jean Giraud  
#6 Posted : 28 February 2019 07:59:51(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Razonar Go to Quoted Post
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 (16kb) downloaded 15 time(s).



Offline Davide Carpi  
#7 Posted : 28 February 2019 11:48:34(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
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

Edited by user 28 February 2019 12:43:45(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 3 users thanked Davide Carpi for this useful post.
on 28/02/2019(UTC),  on 28/02/2019(UTC),  on 28/02/2019(UTC)
Offline Jean Giraud  
#8 Posted : 28 February 2019 19:22:34(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
...
JoBlo.PNG
Offline Jean Giraud  
#9 Posted : 28 February 2019 20:42:13(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... append this Jacobian matrix.

AppendJacob.PNG
Offline Razonar  
#10 Posted : 28 February 2019 21:05:51(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post

Saludad Alvaro [is that correct ?]


Close. Correct it's Saludos Jean.

Originally Posted by: Davide Carpi Go to Quoted Post
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:

append.gif append2.gif
Best regards.
Alvaro.

Edited by moderator 01 March 2019 21:09:41(UTC)  | Reason: marked as Solved

Offline Jean Giraud  
#11 Posted : 01 March 2019 07:03:18(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Razonar Go to Quoted Post
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 (1,076kb) downloaded 15 time(s).


Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.