how to add exponential trend?

5 visualizzazioni (ultimi 30 giorni)
nika qochqiani
nika qochqiani il 26 Giu 2016
Commentato: Star Strider il 26 Giu 2016
i have an oscilating function plot/figure and want to add exponential trend on this function. how can i do it?

Risposte (1)

Tien Tran
Tien Tran il 26 Giu 2016
Hi Nika
Star Strider have answered this question for similar problem as following:
A=[ 0.734 2.956 132.351 6.1775 1.385 1.79887 5.122 12.2774 5.1001 6.07515 10.232 20.3542 9.688 0.983 51.3152 7.42856 16.5368 6.44541 6.19359 7.7353 10.5964 5.5078 55.8428 4.35722 2.83427 1.88594 19.367 1.89 24.5355 30.6559 34.2349 7.1513 2.2275 30.2956 3.16718 18.1018 ];
C=[ 4039 1896 2322 2961 3443 3020 1729 7097 1942 1956 2774 2787 2840 4313 1206 2204 2909 2454 2694 3224 2189 2686 2591 3210 3751 3321 1884 2780 1185 1358 1331 1960 3563 2483 4451 2589];
expfit = @(b,x) b(1) + b(2).*exp(b(3).*x + b(4));
SSECF = @(b) sum((C - expfit(b,A)).^2);
B0 = ones(4, 1);
B_est = fminsearch(SSECF, B0);
xpv = linspace(min(A), max(A));
figure(1)
plot(A, C, 'bp')
hold on
plot(xpv, expfit(B_est, xpv), '-r')
hold off
grid
xlabel('Volume of GTV(cc)')
ylabel('Total MU')
title('Volume of GTV v. Total MU')
text(mean(xlim)*0.9, mean(ylim), sprintf('\\Sigma MU = %.2f %+.2f\\cdote^{%+.4f\\cdotV_{GTV} %+.2f}', B_est))

Community Treasure Hunt

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

Start Hunting!

Translated by