필터 지우기
필터 지우기

Not getting expected graph. Only straight lines are coming but there should be curve .

조회 수: 1 (최근 30일)
clc
tspan = (0:0.25:100);
y0 = [1376000000,10,0];
[t,y] = ode45(@(t,y)[-3.6*10^-9*y(1)*y(2)+0*y(3);-3.6*10^-9*y(1)*y(2)-0.5*y(2);0.5*y(2)-0*y(3)],tspan,y0);
plot(t,y(:,1),'b',t,y(:,2),'r',t,y(:,3),'g')

채택된 답변

Steven Lord
Steven Lord 2020년 7월 14일
The values of the first component of the solution are so much larger in magnitude than the others that even if they did vary (which they do at first before settling down into what looks to be a steady state after about t = 2 or t = 3) it would be like trying to see one Lego block on the ground from the window of an airplane cruising at 30,000 feet.
If you plot the three components separately you can see the variation at the start.
figure
subplot(3, 1, 1);
plot(t, y(:, 1), 'b');
subplot(3, 1, 2);
plot(t, y(:, 2), 'r');
subplot(3, 1, 3);
plot(t, y(:, 3), 'g')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by