1 Pages (18 items)
Syntax for linterp - What is the correct syntax for linterp(x,y,z) - Messages
#1 Posted: 2/14/2019 6:57:41 PM
Sorry to be so slow on Smath. Some thing work like Mathcad and some don't. I need help with the correct syntax for the interpolation function linterp. I have tired all combinations of syntax that I can think of and none work in the attached Smath file.
Help would be appreciated.
RMD CALCULATION.sm (15 KiB) downloaded 41 time(s).

Help would be appreciated.
RMD CALCULATION.sm (15 KiB) downloaded 41 time(s).
#2 Posted: 2/14/2019 7:17:53 PM
#3 Posted: 2/14/2019 8:30:15 PM
I don't think vectorize works with this function. It is expecting a single value in argument 3. Checkout my linterp2 function in the attached. I think it does what you want.
RMD CALCULATION.sm (18 KiB) downloaded 48 time(s).
Note: In my program, it is not necessary to initialize the result. However, I have found that in cases of large vectors, it speeds up processing time to initialize a vector to the expected size and then fill in values. I generally just do this as standard practice now even if it's not necessary.
RMD CALCULATION.sm (18 KiB) downloaded 48 time(s).
Note: In my program, it is not necessary to initialize the result. However, I have found that in cases of large vectors, it speeds up processing time to initialize a vector to the expected size and then fill in values. I generally just do this as standard practice now even if it's not necessary.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#4 Posted: 2/14/2019 8:47:17 PM
Thanks much. You are a real help.
I did not realize that the interpolation functions required additional programming. I incorrectly assumed it was like Mathcad. Many things are like Mathcad, but clearly not all.
Thanks again.
Reg
I did not realize that the interpolation functions required additional programming. I incorrectly assumed it was like Mathcad. Many things are like Mathcad, but clearly not all.
Thanks again.



Reg
#5 Posted: 2/14/2019 8:56:20 PM
No problem!. Welcome to the forum. There are a lot of people here who are regular contributors and will help you with questions you have. For me, it's why I primarily use SMath for my calculations.
Regarding similarity/dissimilarity to MathCAD... once you start using SMath more you'll stop thinking in "MathCAD" and be able to think in "SMath". As a former MathCAD convert myself, I really started to come into my own when I stopped thinking of how I would do things in MathCAD and started figuring out how best to use SMath.
Regarding similarity/dissimilarity to MathCAD... once you start using SMath more you'll stop thinking in "MathCAD" and be able to think in "SMath". As a former MathCAD convert myself, I really started to come into my own when I stopped thinking of how I would do things in MathCAD and started figuring out how best to use SMath.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#6 Posted: 2/14/2019 9:16:12 PM
WroteSome thing work like Mathcad and some don't.I need help with the correct syntax for the interpolation function linterp.
Read carefully: linterp, cinterp are 1/1 Mathcad
Smath ainterp has special virtues not found in Mathcad.
Smath linterp, cinterp, ainterp are 1/1 Mathcad as interpolation.
but are 0/1 as scalar functions. In many instances, it is possible
to recast the problem in the form of infinitesimal analysis.
I found no way to render a_c_l interp scalar Mathcad style.
Though, I have the Mathcad code. Don't confuse yourself, a_c_l_interp
they plot on the canvas, i.e: they plot scalar.
scalar is a kernel internal vanishing iterator
Next question: please attach the Smath document.
Jean
#7 Posted: 2/14/2019 9:53:35 PM
#8 Posted: 2/14/2019 10:57:58 PM
#9 Posted: 2/14/2019 11:51:13 PM
#10 Posted: 2/15/2019 12:08:02 AM
#11 Posted: 2/15/2019 12:20:02 AM
Jean,
I appreciate your attempt at helping me. Unfortunately, I am new to Smath and don't really understand your syntax in your attached sm file. See my comments in the attached file.
WroteWroteOops I meant this way to no success.
RMD CALCULATION (J).sm (18 KiB) downloaded 35 time(s).
RMD%20CALCULATION%20(J)-1.sm (21 KiB) downloaded 30 time(s).
Sorry, I am just too new to this code to appreciate your input.
Thanks again,
Reg
#12 Posted: 2/15/2019 12:41:09 AM
Hi. You can do some plots too.
Best regards.
Alvaro.
RMD CALCULATION.sm (10 KiB) downloaded 39 time(s).

Best regards.
Alvaro.
RMD CALCULATION.sm (10 KiB) downloaded 39 time(s).
#13 Posted: 2/15/2019 1:46:57 AM
Thanks to all. I was able to find some useful stuff from everyone. Here is where I was headed.
RMD CALCULATION.sm (16 KiB) downloaded 28 time(s).
RMD CALCULATION.sm (16 KiB) downloaded 28 time(s).

#14 Posted: 2/15/2019 1:57:46 AM
WroteSorry, I am just too new to this code to appreciate your input.
Thanks again,
Reg
Hello Reg ... answered in blue
RMD CALCULATION (J in_blue)-1.sm (24 KiB) downloaded 36 time(s).
#15 Posted: 2/15/2019 3:51:44 AM
Just a note.
Pay attention to the plot by Alvaro. He uses often neded lele() function (Custom functions plugin) for checking if the value is in a range: Xmin<=x<=Xmax
Regards,
Radovan
Pay attention to the plot by Alvaro. He uses often neded lele() function (Custom functions plugin) for checking if the value is in a range: Xmin<=x<=Xmax
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
frapuano 2/15/2019 5:52:00 AM
#16 Posted: 2/15/2019 12:47:44 PM
WroteThanks to all.I was able to find some useful stuff from everyone.
... more in there for publishing.
Little Smath doing so much, so nice !
Jean
RMD CALCULATION (J).sm (35 KiB) downloaded 35 time(s).
#17 Posted: 2/15/2019 6:55:22 PM
#18 Posted: 2/15/2019 10:48:25 PM
WroteIs this XY plot new?I find it really helpful.
Not new, just from applied Smath features as in older SS 6179.
1 Pages (18 items)
-
New Posts
-
No New Posts