Function as a program - Сообщения


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:
[LIVE width=303 height=177]http://smath.info/live/?file=1616[/LIVE]
Regards.



I will test it these days - of course

Many thanks Andrey

Test 1

[LIVE width=571 height=445]http://smath.info/live/?file=1619[/LIVE]
in 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
Test 2

[LIVE width=457 height=553]http://smath.info/live/?file=1625[/LIVE]
This is nice

Regards,
Radovan
WroteAm 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.
This is one of the greatest feature needed for SMath IMHO.
Regards,
Radovan

Assignment inside matrix! Matrix has the value and the variables inside as matrix elements.
[LIVE width=256 height=192]http://smath.info/live/?file=1640[/LIVE]
Regards,
Radovan
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.
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

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
WroteThis 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.
Regards.
WroteHi. 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.
[MATH=eng]range(1,6*2)=mat(1,2,3,4,5,6,7,8,9,10,11,12,12,1)[/MATH] [MATH=eng]range(1,6)*2=mat(2,4,6,8,10,12,6,1)[/MATH]
Regards,
Radovan
Defining a function as f(x) := 1*(| ... ) make all variables in line(...) as globals.
Regards.
-
Новые сообщения
-
Нет новых сообщений