Plotting end points from different arrays
이전 댓글 표시
This program has been used to plot graphs of various variables against time to see how they change. The variable Qe is changed by repeatedly decreasing by 0.1 and then the plots are put together on one graph. I was wanting to plot the end points of these variables (a, e, de, da) against Qe however I have been unable to do so. Any help is appreciated.
format long
g = 36;
M = 10000002;
a = zeros(M,1);
e = zeros(M,1);
da = zeros(M-1,1);
de = zeros(M-1,1);
T = [0:10000000];
e(1) = 0.0549;
a(1) = 0.3844e9;
for m = 0:10000000
de(m+1) = -(4.04562756e41 + ((2.75561858e40)/g)) * ((a(m+1))^(-13/2)) * e(m+1);
a(m+2) = a(m+1) + (da(m+1) * 3.154e7);
end
e = e(1:end-1);
a = a(1:end-1);
plot(T,e)
hold on
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
