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 Alex M.  
#1 Posted : 10 April 2014 23:26:17(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hi All,

So I am using Smath Studio for personal projects (I am converting from Mathematica that I no longer have access to).

Here is a very simple task i need to do and yet after 30 minutes of search I still do not know how to achieve it:

Say I have g=h+j-k+100

How do I evaluate g for h = 1, j=2, k=3?

I have found that if g=j+2, setting g(j)=g will do the trick for one variable only: g(1)=3, while g=j+2.

In mathematica it would be as simple as g/.{h->1,j->2,k->3}

This would come in very useful if you would want to evaluate function that has more than one variable.

Many thanks!

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

Offline Alex M.  
#2 Posted : 11 April 2014 00:46:56(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Thank you ioan92! That is really what I needed.

Also what would be the best tutorial you can recommend on SMATH? Either English or Russian.

Thanks!
Offline mkraska  
#3 Posted : 11 April 2014 00:49:40(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1120 time(s) in 718 post(s)
The FunctionsExtensions plugin provides the at() substitution function with special operator formatting. This exploits the symbolic storage of the expression in the variable g.
File Attachment(s):
at.sm (9kb) downloaded 22 time(s).
mkraska attached the following image(s):
at1.PNG
at2.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Alex M.  
#4 Posted : 11 April 2014 00:54:11(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
That looks very interesting as well, will experiment. Thanks!

Edited by user 11 April 2014 01:00:46(UTC)  | Reason: Not specified

Offline Alex M.  
#5 Posted : 17 April 2014 17:36:20(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hi everyone!,

Not sure if this would be a bug but at() function does not seem to work while evaluating fuctions that include Min() or Max().

See workbook and photo attached.

Thanks!
File Attachment(s):
sm1.sm (10kb) downloaded 21 time(s).
Alex M. attached the following image(s):
sm1.png
thanks 2 users thanked Alex M. for this useful post.
on 18/04/2014(UTC),  on 19/04/2014(UTC)
Offline mkraska  
#6 Posted : 17 April 2014 18:10:56(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1120 time(s) in 718 post(s)
Confirmed. This is bug of Min() and Max(). Apparently they always try to return a numeric result, regardles of what the optimization setting is. If they would return themselves with evaluated/preprocessed arguments, at() would work, as the example with max() shows.
mkraska attached the following image(s):
max.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/04/2014(UTC)
Offline Davide Carpi  
#7 Posted : 17 April 2014 20:49:34(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1323 time(s) in 873 post(s)
Thanks, added in BTS: SS-114.


Best regards,

Davide
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 18/04/2014(UTC)
Offline Davide Carpi  
#8 Posted : 02 December 2014 13:49:20(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1323 time(s) in 873 post(s)
Done
Davide Carpi attached the following image(s):
2014-12-02 11_49_08-SMath Studio Desktop - [sm1 (1).sm].png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
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.