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 E-Jay  
#1 Posted : 16 October 2013 18:27:48(UTC)
E-Jay


Rank: Member

Groups: Registered
Joined: 15/08/2013(UTC)
Posts: 10
United States
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.

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

Offline mb10  
#2 Posted : 16 October 2013 18:46:45(UTC)
mb10


Rank: Member

Groups: Registered
Joined: 27/08/2013(UTC)
Posts: 19
Italy

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.
Offline omorr  
#3 Posted : 16 October 2013 19:01:48(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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):
mat2sys.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline E-Jay  
#4 Posted : 16 October 2013 20:35:36(UTC)
E-Jay


Rank: Member

Groups: Registered
Joined: 15/08/2013(UTC)
Posts: 10
United States
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.
Offline mkraska  
#5 Posted : 16 October 2013 23:46:28(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

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):
mat.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 17/10/2013(UTC)
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.