1-d curve equation
Afficher commentaires plus anciens
I have two arrays:
1_time ->
t=(0:15);
2_measurements ->
data1=[ 0 7 20 28 35 48 57 61 72 82 96 98 111 121 129 144 ];
I have to get the estimation at t=20 ( linear method ) ,and the 'minimum & maximum' difference between the linear equation line and the data1 curve .
My method was :
1 Making a plot ->
plot(t,data1);
2 Getting the estimated at t=20 by using the numerical panel (tool-> basic fitting)

3 And finally i get the 'minimum & maximum' difference between the linear equation line and the data1 curve , by plotting the residuals

Is there any code to get what i want and not by using plotting .. ect ? I am a newbie when it come to matlab
2 commentaires
Image Analyst
le 20 Avr 2016
This is a 1-D curve, not a 2-D curve. For each element of your dependent variable, "data1", there is exactly one independent variable, "t", that specifies it, not two. data1 is a 1-D vector, not a 2-D matrix.
MRT gang
le 21 Avr 2016
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 20 Avr 2016
out=interp1(t,data1,20,'linear','extrap')
1 commentaire
MRT gang
le 20 Avr 2016
Catégories
En savoir plus sur Fit Postprocessing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!