Untitled

 avatar
unknown
plain_text
6 months ago
433 B
4
Indexable
global t x

t = [0,1,2,3,4,5,6,7,8,9];
x = [9.6, 29.0, 71.1, 174.6, 350.7, 513.3, 594.4, 640.8, 655.9, 661.8];
plot(t,x,'*');

start=[1,10]
estimates = fminsearch(@Expfun,start)
z = x(1)*estimates(2)./x(1)+(estimates(2)-x(1)).*exp(-estimates(1)*t))
z1 = (z-x).^2;

tt = 0:0.25:9;

z = x(1)*estimates(2)./(x(1)+1(estimates(2)-x(1)).*exp(-estimates(1)*tt));
hold on

plot(tt,z,'-r')
plot(t,z1,'+')
xlabel('t')
ylabel('Number')
hold off
Editor is loading...
Leave a Comment