Loop Not Returning All Values - Programming - Messages
I've have a loop interpolating and searching for values. I not sure what went wrong, the loop is suppose to return 4 answer, however I am only getting (1), the last value.
Appreaciate some help and guidane.
Page7.sm (45 KiB) downloaded 40 time(s).
WroteI've have a loop interpolating and searching for values. I not sure what went wrong, the loop is suppose to return 4 answer, however I am only getting (1), the last value.
Sorry Collab, I don't understand what you are interpolating.
That sub-spaces technique is very useful in many applications.
Cheers ... Jean
Page7 Subspaces.sm (41 KiB) downloaded 32 time(s).
WroteHi,
I've have a loop interpolating and searching for values. I not sure what went wrong, the loop is suppose to return 4 answer, however I am only getting (1), the last value.
Appreaciate some help and guidane.
Page7.sm (45 KiB) downloaded 40 time(s).
Below you can find corrected file.
I have revised some equations in var_file() and G().
They were trying to reach out of matrix.
Since I don't have original mathcad file this is best I can do.
I did some error check but maybe you have to dig further.
Regards
File not found.
Thanks for the reply. Although the val_file() is not returning the same answer as per the attached MathCAD but the overall loop actual works.
See attached calculation in mathcad.
Page 7.xmcd (97 KiB) downloaded 27 time(s).
WroteHi Overlord,
Thanks for the reply. Although the val_file() is not returning the same answer as per the attached MathCAD but the overall loop actual works.
Hi. val_find() returns the vector index, so it must to be the mathcad answer plus one, because ORIGIN:=0 in mathcad.
val_find.sm (134 KiB) downloaded 31 time(s).
Best regards.
Alvaro.
Jean, that is cool stuff... you can draw something like this in the SMath...
WroteHi Overlord,
Thanks for the reply. Although the val_file() is not returning the same answer as per the attached MathCAD but the overall loop actual works.
See attached calculation in mathcad.
Page 7.xmcd (97 KiB) downloaded 27 time(s).
Having the mathcad file revealed the difference of two programs.
The problem is n_min and n_max in smath version.
Mathcad assigns them [0 0], [0 1] and [1 1] only, whatever you enter.
min_offset and max_offset can be calculated within bounds of 9x9 matrix by them.
By that, offsets are always lower then 9 during max_offset=ii*n_max+1.
Your current smath function will produce out of matrix.
Because n_min and n_max are [1 1], [1 2] and [2 2].
And by adding ii to them it will be bigger than 9.
Algorithm should be revised with respect to that.
n_min and n_max should be lowered by 1 to correct it.
You can find re-revised file according to this.
If anything is unusual you can tell, we will try to fix it.
Regards
Page7_re-revised.sm (47 KiB) downloaded 37 time(s).
Thanks for the comprehensive explaination. I will look into it and let you know if there are any bug.
WroteJean, that is cool stuff... you can draw something like this in the SMath...
Your project can be done entirely in Smath.
Unfortunately, it is not modular, unexplained
it reduces the de-bug sanity procedure.
Cheers ... Jean
-
New Posts
-
No New Posts