Page 1 of 2

Scilab exponential interpolation

Posted: Fri Nov 10, 2017 3:42 pm
by JimCuren
I mistakenly posted my question in different thread (sorry about that), so I am re-posting here. First, this board is great. I find better answers here than what I am finding in the scilab specific forums. I guess those other forums are for people that already have expertise on the subject.

I also have a Scilab question: Does anyone know of a scilab script for doing exponential interpolations?

Thanks in advance for any help.

Re: Scilab exponential interpolation

Posted: Fri Nov 10, 2017 5:48 pm
by PLeonat
JimCuren wrote: Fri Nov 10, 2017 3:42 pm I mistakenly posted my question in different thread (sorry about that), so I am re-posting here. First, this board is great. I find better answers here than what I am finding in the scilab specific forums. I guess those other forums are for people that already have expertise on the subject.

I also have a Scilab question: Does anyone know of a scilab script for doing exponential interpolations?

Thanks in advance for any help.
Hi Jim. Not enough detail, it does not compute, well not for me, anyway :-) What are you trying to do? Can you provide some more info so we can at least understand the problem you are trying to solve?

Re: Scilab exponential interpolation

Posted: Fri Nov 10, 2017 6:40 pm
by JimCuren
Sorry, it's clear to me, so I thought everyone understood (just joking).

O.K., here is the problem. I have a bunch of measurements (23 pts) from an experiment. I can plot them and I can tell that there is an exponential type curve (straight line on semi-log plot below). So, I can try and fit a LSF curve to the data and come up with a function to predict values "between" the data points. I am looking for a simpler way, possibly through scilab, to interpolate between the data points, still taking into account the exponential shape of the curve.

Does this make more sense?

Trial # / DiF23 Level / eSO Response Rate
1 1.00 1.857
2 1.16 1.355
3 1.22 1.169
4 1.48 0.899
5 1.63 0.697
6 1.80 0.559
7 1.89 0.528
8 1.98 0.465
9 2.41 0.311
10 2.53 0.263
11 2.79 0.184
12 2.93 0.166
13 3.07 0.117
14 3.39 0.074
15 3.73 0.053
16 3.92 0.045
17 4.12 0.034
18 4.32 0.025
19 4.54 0.018
20 4.76 0.015
21 5.00 0.011
22 5.25 0.009
23 5.52 0.006
esp001.PNG
esp001.PNG (10.88 KiB) Viewed 87949 times

Re: Scilab exponential interpolation

Posted: Fri Nov 10, 2017 7:52 pm
by HowardE
That's not exponential, it's clearly a straight line!

Re: Scilab exponential interpolation

Posted: Sat Nov 11, 2017 3:24 am
by JimCuren
HowardE wrote:That's not exponential, it's clearly a straight line!
Ahem, pay attention to the axes. That's a straight line on a semi-log plot, i.e. it's an exponential type function! Try plotting the values on a linear scale.

Re: Scilab exponential interpolation

Posted: Sat Nov 11, 2017 5:04 am
by BLarson
Not sure if this helps, but I found this folder with a whole bunch of docs, on this board and there is a document there about exponential interpolations

Doc: Exp_Interpolations_Karahalios.pdf
Link: (http://triusinc.com/techs/Exp_Interpola ... halios.pdf)

Take a look and see if it's what you need. Let us know if it was helpful.

Re: Scilab exponential interpolation

Posted: Sat Nov 11, 2017 3:06 pm
by JimCuren
BLarson wrote:Not sure if this helps, but I found this folder with a whole bunch of docs, on this board and there is a document there about exponential interpolations

Doc: Exp_Interpolations_Karahalios.pdf
Link: (http://triusinc.com/techs/Exp_Interpola ... halios.pdf)

Take a look and see if it's what you need. Let us know if it was helpful.
That looks very interesting, but how does it relate to what I am looking for, i.e., a scilab script for doing exp type interpolation?

Re: Scilab exponential interpolation

Posted: Sat Nov 11, 2017 11:55 pm
by PLeonat
JimCuren wrote:
BLarson wrote:Not sure if this helps, but I found this folder with a whole bunch of docs, on this board and there is a document there about exponential interpolations

Doc: Exp_Interpolations_Karahalios.pdf
Link: (http://triusinc.com/techs/Exp_Interpola ... halios.pdf)

Take a look and see if it's what you need. Let us know if it was helpful.
That looks very interesting, but how does it relate to what I am looking for, i.e., a scilab script for doing exp type interpolation?
Yeah, not sure that it's applicable. On the other hand, it also depends on exactly what you are looking for. One thing you said that makes me wonder is that you could fit a function using LSF, but you are looking for something simpler. Simpler than LSF? Why, do you think that LSF is complicated?

Anyway, provide more detail so we can try and help you with your decision.

Re: Scilab exponential interpolation

Posted: Tue Nov 14, 2017 4:53 am
by JimCuren
Not sure what other detail you are looking for, I think it's very simple. A scilab routine to do exponential interpolation.

Re: Scilab exponential interpolation

Posted: Fri Nov 17, 2017 6:33 am
by PLeonat
Not sure how I can best explain this. It's a classical mistake people make with statistics. They think it's magic and somehow it comes up with some sort of equation that all of a sudden describes reality. It can, but only if the one performing the analysis know something about the process and can validate the results. For example, I took a small range of your data points and plotted them in an X-Y plot (exp001), so, the function may or may not be an exponential decay.

Trial #/ DiF23 Level/ eSO Response Rate
3 1.22 1.169
4 1.48 0.899
5 1.63 0.697
6 1.8 0.559
7 1.89 0.528
8 1.98 0.465

And, plotting only points 3,4 & 5, it may seem even more of a linear function (exp002). So, is an exponential decay function the appropriate regression model? I hope this sheds some light as to why I am asking these questions
:)
exp001.PNG
exp001.PNG (12.63 KiB) Viewed 87904 times

Re: Scilab exponential interpolation

Posted: Fri Nov 17, 2017 10:17 pm
by BLarson
Pleonat, that's why I qualified my response. Also, the paper I quoted very clearly identifies under what conditions the method would be applicable.
BLarson wrote: Sat Nov 11, 2017 5:04 am Doc: Exp_Interpolations_Karahalios.pdf
Link: (http://triusinc.com/techs/Exp_Interpola ... halios.pdf)
In any case, I do agree with your main premise that any sort of analytics/statistics is only as good as the understanding of the person using it.

Re: Scilab exponential interpolation

Posted: Mon Nov 20, 2017 4:35 am
by JimCuren
Thanks, everyone. I do understand what everyone is saying about how to interpret and use statistics, in general, but I think everyone missed the original request, i.e., if anyone had a scilab script for exponential interpolation :-)

In any case, I am working on putting one together right now. If I do, I will post it here.

Re: Scilab exponential interpolation

Posted: Mon Nov 20, 2017 2:54 pm
by PLeonat
JimCuren wrote: Mon Nov 20, 2017 4:35 am Thanks, everyone. I do understand what everyone is saying about how to interpret and use statistics, in general, but I think everyone missed the original request, i.e., if anyone had a scilab script for exponential interpolation :-)

In any case, I am working on putting one together right now. If I do, I will post it here.
That's probably because the concept of interpolation and how to use stats is more important that the scilab implementation. That part is trivial.here is an example using the values at t=1 and t=3 to interpolate the value @ t=2 from the original paper by Karahalios:

--> function [mexp]=f(t,t1,r1,t2,r2)
> mexp=r1*exp((log(r1/r2)/(t2-t1))*(t1-t))
> endfunction

--> R=f(2,1,0.636445526,3,0.164992304)
R =
0.3240503

As I said earlier, the scilab part is trivial.

Re: Scilab exponential interpolation

Posted: Mon Nov 20, 2017 7:47 pm
by JimCuren
PLeonat wrote: Mon Nov 20, 2017 2:54 pm
JimCuren wrote: Mon Nov 20, 2017 4:35 am Thanks, everyone. I do understand what everyone is saying about how to interpret and use statistics, in general, but I think everyone missed the original request, i.e., if anyone had a scilab script for exponential interpolation :-)

In any case, I am working on putting one together right now. If I do, I will post it here.
That's probably because the concept of interpolation and how to use stats is more important that the scilab implementation. That part is trivial.here is an example using the values at t=1 and t=3 to interpolate the value @ t=2 from the original paper by Karahalios:

--> function [mexp]=f(t,t1,r1,t2,r2)
> mexp=r1*exp((log(r1/r2)/(t2-t1))*(t1-t))
> endfunction

--> R=f(2,1,0.636445526,3,0.164992304)
R =
0.3240503

As I said earlier, the scilab part is trivial.

Thank you, thank you, thank you! Trivial to some may be mind-boggling to others!

Re: Scilab exponential interpolation

Posted: Fri Dec 22, 2017 8:19 pm
by HowardE
I think you guys are all, or most, confused. Interpolation is a simple method to find a value of a functions where the x is between two x-values for which you already know the function value. Why are you confusing it with exponential and logarithmic and all this other things?