try on error - Messages
WroteHi Uni. Admirable work, thanks a lot for this plugin. Just few questions:
- Not related with your plugin, but ... easy asking you: SMath don't have maple's traperror or mathcad onerror functions?
Have a nice day.
Alvaro.
Saludad Alvaro,
The Mathcad program "on error" looks like to me, it has no Smath equivalent.
If you remember Paul W. "Rotate Image" is essentially working on the final
"on error". I must have spent a day attempting, not to avail.
I have posted everything in this forum "Rotate Image", but no reply.
Mike, atempted but not working in Smath 5346 OFFicial release.
Cheeres, Jean
Wrote- Not related with your plugin, but ... easy asking you: SMath don't have maple's traperror or mathcad onerror functions?
Yes, it is named try(2); this function as for now is available only in nightly build and cloud (since SMath Studio 0.98.5952)
The example 1/{-3}+1/{-2}+1/{-1}+1/1+1/2+1/3+1/4+1/5=0.45 works fine.
Easy to check with the latest nightly build, see attached.
The work sheet is "autocal OFF"
Jean
Rotate Image [Mike 16042016].sm (383 KiB) downloaded 60 time(s).
x = 1, y = 1, i = 5, j = -5
error
sum = mat(-6375,-6375,-6375,1,3)
x = 1, y = 1, i = 5, j = -4
error
sum = mat(-11475,-11475,-11475,1,3)
x = 1, y = 1, i = 6, j = -5
error
sum = mat(-19125,-19125,-19125,1,3)
x = 1, y = 1, i = 6, j = -4
error
sum = mat(-25245,-25245,-25245,1,3)
x = 1, y = 2, i = 4, j = -4
error
sum = mat(-4080,-4080,-4080,1,3)
x = 1, y = 2, i = 4, j = -3
error
sum = mat(-7140,-7140,-7140,1,3)
...
...
...
x = 2, y = 7, i = 2, j = 1
sum = mat(379,379,379,1,3)
x = 2, y = 8, i = 1, j = 1
sum = mat(126.333333333333,126.333333333333,126.333333333333,1,3)
x = 2, y = 8, i = 1, j = 2
sum = mat(373,373,373,1,3)
x = 2, y = 8, i = 2, j = 1
sum = mat(625.666666666667,625.666666666667,625.666666666667,1,3)
x = 2, y = 8, i = 2, j = 2
sum = mat(1120.33333333333,1120.33333333333,1120.33333333333,1,3)
...
Finally, a traperror for SMath!. That´s great. I'm go to try this "nightly" build, just for have this command. Thanks a lot, Davide.
And Uni, I'm reading your source code and SMath documentation for imagine how to do that.
Best regards.
Alvaro.
Regards.
Alvaro.
Rows$Cols.sm (20 KiB) downloaded 59 time(s).
WroteWhell, here some applications of try. But a lot of issues implementing it.
I only see two issues. First two aren't issues.
- IsScalar(f): you fail before try(), in IsString(x), where the non-defined f exhibits itself. You must take into account, that f(x):=3*x didn't define symbol f, only symbol f(#), because in SMath, variable, function with one argument, function with two arguments, ... having same name are different entities.
- lineRows(a) - here rows(x) actually succeeds, giving symbolic answer: rows(a). try() returns it to line(), which then returns it to evaluator in your numeric "=", where it finally fails. Use eval() here.
Only the pair IsScalarWithoutAnd(x) and IsScalarWithAnd(x) both work wrong. Here, in first definition case, rows() is evaluated symbolically, gives itself (without failing), then the result of try() is considered fixed, thus try(...) is reduced to its "result" - IsScalarWithoutAnd(x)=rows(x). Then this simplified function fails on invocation.
In second definition, the topmost and (&) evaluates its arguments numerically, rows(x) numerically fails because x is undefined, try() intercepts it and returns 0, which is compared to 0, and result (equal=true=1) is anded with 1, which gives ... yes, 1. So, the resulting preprocessed definition looks like IsScalarWithAnd(x)=1 (it always returns same result regardless its argument).
Oh, by the way, diff(x,x) always gives 1. So last function is simplified to IsVariable(x)=1.
"IsScalar" is missing: YES
"ifIsScalar" was added in Mathcad in 2003 [DAEP].
Quite a few suggestions are redundant. I might be missing some real use.
We need the 1/1 Mathcad "on error" as exemplified in "Image Rotate"
Just as is to keep things simple in program.
Every time a new code is developped, it might scrap Smath work sheets
working well in previous version(s). Why not invent a batch run of user
work sheets to enable testing. That supposes an Smath repository and
some voluntary work
Integrate Adaptive.sm (16 KiB) downloaded 37 time(s).
About the f, what is an issue for me is not the error when evaluate the last example, is the not-error in the others evaluations.
About the diff, I don't understand when the type check is implemented. diff(x,x) actually is a theorem, a rule or something like that, but type check must to be before any answer.
About this version, I see that my jacobian now don't work: http://en.smath.info/forum/resource.ashx?a=661&b=2 in this old post: http://en.smath.info/forum/yaf_postst1555_Hessian.aspx
Best regards.
And sorry Uni for post this things here, but my original intention was implement try function inside of a script in vb or python, and other functions like Is testing and those others.
Best regards.
Alvaro.
WroteOh, another thing. For me "variable" is that thing that can you can use second arg in diff. MapleV accept only names, but higher versions also take other things, like vector elements (V[i], for example) which is very very useful. And what I try actually is some kind of independence test. The best independence test that I know is, preciselly, diff(f,x)=0.
And sorry Uni for post this things here, but my original intention was implement try function inside of a script in vb or python, and other functions like Is testing and those others.
Best regards.
Alvaro.
The way you write "diff(f,x)=0" ... I read 1rst derivative of 'f' wrt 'x'
then equate to 0 for roots. Simple: assign diff(f,x) to a new function,
for instance ff(x):=diff(f,x) ... equate ff(x)=0 for roots.
For the derivative of a vector, if the vector is not smooth you get derivative
+ an immense amount of noise. If the vector is smooth from a function, then get the drivative from the function, then evaluate at points. It could be Maple spline the
vector but that is as bad as good as you know nothing under the hood.
Cheers, Jean
Wrote
The way you write "diff(f,x)=0" ... I read 1rst derivative of 'f' wrt 'x'
then equate to 0 for roots. Simple: assign diff(f,x) to a new function,
Hi Jean. Yes, you're rigth. What I must to wrote was diff(f,x) identically equals zero, i.e. f'(x)=0 for all x in Domain(f). This is the good definition for independence criteria, and, as you say, diff(f,x)=0 is for search critical points.
I found a new nightly build, http://en.smath.info/forum/yaf_postst7576_SMath-Studio-0-98-5990--26-May-2016.aspx, where my jacobian works, but ... with a but. Attached in pdf too.
Best regards.
Alvaro.
File not found.File not found.
Wrotehere my jacobian works, but ... with a but.
Opened an issue: SS-2353

edit: discussion about try function moved here.
WroteI have posted everything in this forum "Rotate Image", but no reply.
Mike, atempted but not working in Smath 5346 OFFicial release.
Jean,
I promised not to touch anything you write here, but here you have mentioned a problem that I had helped you to solve, in a manner that makes it look like I failed, so I have to respond.
First, in your message, you failed to provide a link to the topic where that problem was dealt, so that anyone could just look at it themselves, and see that the suggested solution works in timespan of about a minute in 5346 on a modest hardware (my PC gives ~40 s).
Then you provide a file that you name as if it is mine:
WroteRotate Image [Mike 16042016].sm (383 KiB) downloaded 60 time(s).
and actually is an incompetent modification that shows lack of comprehension. Inserting things like "a:=(R+G+

Please go on making useless claims when you declare your wishes as everyone's demand (like "We" in We need the 1/1 Mathcad "on error" as exemplified in "Image Rotate"), but please refrain claiming others failing when describing your endless failures, like everywhere in this forum, or in Mathcad Collaboratory - like that case, that you claimed later as "I defeated my detractors twice and for ever in this Colaboratory" and "I put units in the Reynolds number [unitless] but got result that none could decipher, even Mathsoft".
WroteWrotehere my jacobian works, but ... with a but.
Opened an issue: SS-2353Just to remember it, this is the thread of the Script Region plugin; would be better to don't go too much off topic
edit: discussion about try function moved here.
Hi Davide. Thanks for move the post and make clean Uni's script plugin.
Best regards.
Alvaro.
-
New Posts
-
No New Posts