How can I divide my fitted curve by the determined coefficient in order to normalize it?

1 view (last 30 days)
I have determined a curve of best fit using the fittype, fitoptions and fit functions, however I would like to divide my curve by one of the determined coefficients in order to normalize it for comparative purposes. I unfortunately have no idea how to do this. An example of my code can be seen below.
if true
xasp=[0;30;60;120;180;240;300;360;495;600];
yasp=[0;0.2872;0.5607;0.5232;1.0856;1.1968;1.5946;1.8525;2.3285;2.7937];
ft=fittype(@(a,c,x)a*(1-exp(-x*c)));
Fasp=fitoptions('method','NonlinearLeastSquares','Lower',[0,0],'Upper',[4,6],'StartPoint',[4,0.5]);
[curveasp,gofasp]=fit(xasp,yasp,ft,Fasp)
end
This gives the following result:
if true
curveasp =
General model:
curveasp(x) = a*(1-exp(-x*c))
Coefficients (with 95% confidence bounds):
a = 4 (2.143, 5.857)
c = 0.001743 (0.0005611, 0.002925)
gofasp =
sse: 0.1579
rsquare: 0.9791
dfe: 8
adjrsquare: 0.9765
rmse: 0.1405
end
I know that I can save the value of 'a' by saying a=curveasp.a however I would like to divide my curve by the value of 'a' so that the new curve is just given by y=1-exp^-(cx) instead of y=a(1-exp^-(cx)), but cannot seem to figure out how to do it.
Any help would be appreciated.

Answers (0)

Community Treasure Hunt

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

Start Hunting!