Asymptotes and exponential decay functions

2 Ansichten (letzte 30 Tage)
Lynn Knoblauch
Lynn Knoblauch am 30 Jun. 2012
Does anyone know how to write a script for an exp decay and get the asymptote value as well?
  2 Kommentare
Walter Roberson
Walter Roberson am 30 Jun. 2012
Which asymptote? Substitute +inf or -inf for "t" to get those asymptote. Asymptote near a singularity is more difficult.
Lynn Knoblauch
Lynn Knoblauch am 30 Jun. 2012
Bearbeitet: Walter Roberson am 30 Jun. 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')

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by