Equation to exponential eq using curve fit tool.

1 visualización (últimos 30 días)
Tyde Hilderbrandt
Tyde Hilderbrandt el 9 de Oct. de 2021
Respondida: Star Strider el 9 de Oct. de 2021
Hello all,
I am new to matlab and trying to find the equation of a exponetial from the curve fit tool which looks at the cooling of an object my code looks like where T is 658
636
583
512
490
449
418
365
359
320
306
266
248
228
218
201
186
178
163
149
139
138
125
118
112
102
96
90
87
81
72
and t is 0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
but the equation dosnt produce the correct values
clc
clear all
load('Project_1_data.mat');
T
t
a=205.9;
x=20;
b=-0.7099;
Teq=a*exp(b*x)

Respuesta aceptada

Star Strider
Star Strider el 9 de Oct. de 2021
It will produce the correct values if it is allowed to. The ‘b’ value is 100 times greater than it should be, according to the fitted parameters here —
T = [ 658
636
583
512
490
449
418
365
359
320
306
266
248
228
218
201
186
178
163
149
139
138
125
118
112
102
96
90
87
81
72];
t = [0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300];
ft = fittype('a*exp(b*x)', 'Dependent','T', 'Independent','x', 'Coefficients',{'a','b'})
ft =
General model: ft(a,b,x) = a*exp(b*x)
fft = fit(t,T,ft, 'StartPoint',[T(1),-0.01])
fft =
General model: fft(x) = a*exp(b*x) Coefficients (with 95% confidence bounds): a = 664 (653.1, 675) b = -0.007808 (-0.008011, -0.007604)
figure
plot(fft, t, T)
grid
xlabel('t')
ylabel('T')
Experiment to get different results.
.

Más respuestas (0)

Categorías

Más información sobre Fit Postprocessing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by