Array of x and y values. Find value of y when x=0, how?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello. I have an assignment in school, where we got an array with x and y values to plot.
Time=[0.5:0.5:5];
A=[1.2 0.73 0.45 0.27 0.16 0.11 0.06 0.035 0.022 0.013];
plot(Time,A) gives me a graph but I need the value of A when Time=0;
I don't have a function or equation, only these values. So when Time=0, what is the value of A?
I'm thinking that some kind of y-intercept thing can be the solution?
0 Kommentare
Antworten (2)
KL
am 27 Nov. 2017
You might want to use interp1,
Hint: For your case, 0 lies outside the range you've got, so you might want to extrapolate.
5 Kommentare
KL
am 28 Nov. 2017
I agree with the cyclist. In your question you say ...I don't have a function or equation, only these values... and looks like you do have one.
the cyclist
am 27 Nov. 2017
Strictly speaking, it is not possible to know what the value of A is at Time=0, given only this information. An infinite number of functions could fit these data, and give different values at Time=0. Or maybe Time=0 is an asymptote, and the fit line never crosses it.
Do you have any other relevant info that you have not shared?
2 Kommentare
the cyclist
am 27 Nov. 2017
Fantastic.
If you take the log of each side of that equation, you get
log(A) = log(A0) - k*time
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!