All pastes #591732 Raw Edit

Unnamed

public text v1 · immutable
#591732 ·published 2007-06-27 11:15 UTC
rendered paste body
M = load('daten_nlin_exp.dat');

t = M(:,1);
y = M(:,2);

beta_start = 1;
f = @(y,beta_start,t) exp(-beta_start .* t);

fs = 'exp(-beta_start .* t)';

beta_opt = nlinfit(t,y,fs,beta_start);

t1 = linspace(0,15,300);
yf = f(y,beta_opt,t1);

figure
g_l = line(t,y);
hold on
set (g_l,'linestyle','none','marker','*','markerfacecolor','b','markeredgecolor','b');
plot(t1,yf,'k');
axis([0 15 -0.1 1.1])
xlabel('t');
ylabel('y');
title(['Daempfungsfaktor = ',num2str(beta_opt)]);
hold off