Scaling axes on plot
古いコメントを表示
Hello,
I am trying to make plots that are the same as the two plots at the bottom of this page http://www.umich.edu/~elements/5e/02chap/learn-cdp2_solution.html
For the very first plot (black), it has it basically at zero on my plot, but on the website the straight horizontal line is elevated
And I am having a problem with the second graph (green) at the bottom of the page because I don't have that straight line before the exponential decay.
For the third graph (blue), the scaling is not good which is why the line shoots straight up, instead of what the one on the website looks like
X = linspace(0,1,1000);
rA = (-10^-8)/3.*(X <= 0.5) + (-10^-8)./(3+10*(X-0.5)).*(X > 0.5);
f2 = @(x) 1./((-10^-8)./(3+10.*(x-0.5)));
figure
plot(X,-1./rA)
for i = 1:numel(X)
if X(i) <= 0.5
V_PFR(i) = (-1000/(10^-8/3)*-0.5);
else
V_PFR(i) = (-1000/(10^-8/3)*-0.5) + -1000*integral(f2,0.5,X(i));
end
end
figure
plot(V_PFR,-rA)
xlim([0 4.5e11])
xlabel('V_{PFR}')
ylabel('r_{A}')
title('r_{A} vs V_{PFR}')
figure
xlim([0 4.5e11])
plot(V_PFR,X)
xlabel('V_{PFR}')
ylabel('X')
title('Conversion vs. V_{PFR}')
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!