Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hey! I have really good news today! ancing: Hint 1: Local variable and functions are really local now. Hint 2: Line as a body of definition (right part of equation) is required. Hint 3: Last element of line(..) function returns an answer to the left part. Seems SMath Studio 0.90 will be really powerful tool! Thanks to all for helping me with a project! Best regards, Andrey Ivashov.
Related topics: Operators behavior? User defined functions and others...Edited by user 01 October 2010 02:16:40(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
SMath Studio Live updated with the latest sources, so anyone can test new features: Open in SMath CloudRegards.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 249 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
Thanks a lot!! It's really a wonderful improvement.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
|
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Andrey, Test 1 Open in SMath Cloudin the 0.89_6, variable "n" will have the same value and variable "y" will be undefined ("i" will be just i -imaginary unit). Am I missing something? I've thought that variables "n", "y" and "i" should not be known here. i.e. being local to the function g(x,f(x)). Hint 1: Local variable and functions are really local now. Please explain what does this mean. I might be misleading. Regards, Radovan Edited by user 01 October 2010 10:16:41(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
|
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Radovan, thank you for testing! omorr wrote:Am I missing something? I've thought that variables "n", "y" and "i" should not be known here. i.e. being local to the function g(x,f(x)).
Hint 1: Local variable and functions are really local now. Please explain what does this mean. I might be misleading. It is an error that I should fix. Variables defined in the right part of expression will not be visible outside of this expression. Regards.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Wish you good luck Andrey,
This is one of the greatest feature needed for SMath IMHO.
Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
This is also working now Assignment inside matrix! Matrix has the value and the variables inside as matrix elements. Open in SMath CloudRegards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hello. Interesting thing - line(..) function on the right part of equation means now that SMath Studio will not even parse all stuff of the line before left part will be called by someone. And here is a side effect: This is not the error, but some interesting way to work with functions. In other words it is like one more option of Optimization. Numeric optimization means, that program will try to evaluate right part of equation numerically, symbolic optimization - evaluate symbolically, no optimization means, that program will substitute all previous definitions to the right part of equation and line(..) function at right means that program will not substitute previous definitions to the right part at all. Best regards. Edited by user 04 October 2010 01:06:53(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
smath wrote:... line(..) function at right means that program will not substitute previous definitions to the right part at all. This is also a nice one . The solution when you want to see how the function was actually defined - without replacing things. BTW., just tried 0.89_8. I am not sure but there might be a minor issue. If you have the file "somefile.sm" and in the same folder save as HTML, there would be "somefile.htm" file and "somefile" folder with pictures. Now, if you try to save the compressed SMath studio file with the name "somefile" as the compressed SMath type "*.smz", it will not be saved unless you explicitly type in the file name box "somefile.smz". Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Member Groups: Registered
Joined: 03/06/2009(UTC) Posts: 25
Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: smath This is not the error, but some interesting way to work with functions. In other words it is like one more option of Optimization. Numeric optimization means, that program will try to evaluate right part of equation numerically, symbolic optimization - evaluate symbolically, no optimization means, that program will substitute all previous definitions to the right part of equation and line(..) function at right means that program will not substitute previous definitions to the right part at all. Best regards. I'm not comftable with this. As shown in the picture, when write 'g', 'a' appears as 'a = 2'. Others programs have a warning message for the use of global variables locally. I think that you must to introduce a global command to catch the value of a in g(x). Regards. Alvaro. adiaz attached the following image(s):
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Alvaro, I could not get the same results as you did. See the picture please. 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: 03/06/2009(UTC) Posts: 25
Was thanked: 5 time(s) in 5 post(s)
|
Hi. In my example it is (|a*x)*1, but yours is (|a*x*1)
Regards.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Alvaro, Originally Posted by: adiaz Hi. In my example it is (|a*x)*1, but yours is (|a*x*1) You are right. This might be sometimes quite frustrating. Everything looks the same but the result is different. SMath can not deal with braces correctly and satisfactory quite often This one is one of the examples of that problem I mentioned few times here on the Forum. range(1,6*2)=mat(1,2,3,4,5,6,7,8,9,10,11,12,12,1) range(1,6)*2=mat(2,4,6,8,10,12,6,1)Regards, Radovan Edited by user 01 October 2012 17:05:09(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
1 user thanked omorr for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 03/06/2009(UTC) Posts: 25
Was thanked: 5 time(s) in 5 post(s)
|
Well, as I see, this the price for obtain clarity in others expression. Mathematica have a lot of this problems with TraditionalNotation, Maple too. But at the end, this give less mistakes that working with parenthesis and text notations.
Defining a function as f(x) := 1*(| ... ) make all variables in line(...) as globals.
Regards.
|
|
|
|
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.