SMath Studio Forum
»
SMath Studio
»
Questions
»
define one vector from another
Rank: Member Groups: Registered
Joined: 15/08/2013(UTC) Posts: 10 Location: Alliance, Ohio Was thanked: 3 time(s) in 2 post(s)
|
I would simply like to define a vector, then apply a operation to each element and have the results in a second vector. This seems to be simple in MathCad but I can't seem to get it in SMath Studio. In MathCad In SMath Studio I get this. I'm not shre just what this result is. Any assistance would be appreciated. Thank you.
|
|
|
|
Rank: Member Groups: Registered
Joined: 27/08/2013(UTC) Posts: 19 Was thanked: 9 time(s) in 5 post(s)
|
The result is the sum of the squares of the elements, multiplied by two. As far as I know SMath does not support vectorization (yet) so, in order to obtain what you need, you should use a for loop.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
If you are using vectors, then you can try mat2sys() and sys2mat() Regards, Radovan omorr attached the following image(s): |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Member Groups: Registered
Joined: 15/08/2013(UTC) Posts: 10 Location: Alliance, Ohio Was thanked: 3 time(s) in 2 post(s)
|
Thank you mb10, I got the For..Loop to work it out. I was wondering if the vector options were available or not.
To omorr, the mat2sys() and sys2ma() looks like a clean method to acheive these functionality but how do I add the mat2sys() and sys2mat() functions?
Thank you.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 Was thanked: 1128 time(s) in 724 post(s)
|
mat2sys and sys2mat are part of the CustomFunctions plugin by Davide Carpi. You can install it using the extension manager (Tools> Plugins) or use the unofficial distribution with pre-installed plugins (link in the signature). You also might consider using the Maxima Plugin (which requires Maxima to be installed on your system) Edited by user 16 October 2013 23:51:01(UTC)
| Reason: Not specified mkraska attached the following image(s): |
|
1 user thanked mkraska for this useful post.
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
define one vector from another
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.