Asymptotes and exponential decay functions

3 visualizaciones (últimos 30 días)
Lynn Knoblauch
Lynn Knoblauch el 30 de Jun. de 2012
Does anyone know how to write a script for an exp decay and get the asymptote value as well?
  2 comentarios
Walter Roberson
Walter Roberson el 30 de Jun. de 2012
Which asymptote? Substitute +inf or -inf for "t" to get those asymptote. Asymptote near a singularity is more difficult.
Lynn Knoblauch
Lynn Knoblauch el 30 de Jun. de 2012
Editada: Walter Roberson el 30 de Jun. de 2012
Thank you for your response. I am VERY novice at this. I may be confused/ wondering if the estimates for the y axis intercept are calculated as the the y-intercept minus asymptote. But I think I need an entirely different code for this. Right now I am working with:
time = [0.009 0.01 0.012 0.0150 0.0167 0.02 0.023 ];
SWA = [11 10 9 8 7.5 7.1 6.9 ];
%set up exp equation
expdecay = @(EXD,xx)(EXD(1)*exp(-EXD(2)*xx));
%initial value cross
EXD = [SWA(1) 2];
%nlinfit to calc EXD(1) and EXD(2) in fitting
expfit = nlinfit(time,SWA,expdecay, EXD)
hrfit = min(time):0.001:max(time);
swafit = expdecay(expfit,hrfit);
figure(1)
plot(time,SWA,'ok','markerfacecolor','m','markersize',5)
hold on
plot(hrfit,swafit,':x')
hold off
xlabel('time across night')
ylabel('SWA')

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by