VFTfcn = @(b,t) b(1).*exp(b(2)./(t-b(3)));
t = 0:9;
n = rand(size(t));
B0 = rand(1,3);
B = fminsearch(@(b) norm(n - VFTfcn(b,t)), B0);
figure
plot(t, n, 'p')
hold on
plot(t, VFTfcn(B,t), '-r')
hold off
grid
text(3, 0.9*max(ylim), sprintf('n = %.1f e^{%.1f/(t-%.1f)}', B), 'HorizontalAlignment','center', 'VerticalAlignment','bottom')
VFTfcn = @(b,t) b(1).*exp(b(2)./(t-b(3)));
t = 0:9;
n = rand(size(t));
B0 = rand(1,3);
B = fminsearch(@(b) norm(n - VFTfcn(b,t)), B0);
figure
plot(t, n, 'p')
hold on
plot(t, VFTfcn(B,t), '-r')
hold off
grid
text(3, 0.9*max(ylim), sprintf('n = %.1f e^{%.1f/(t-%.1f)}', B), 'HorizontalAlignment','center', 'VerticalAlignment','bottom')
0 Comments
Sign in to comment.