필터 지우기
필터 지우기

In ode45 is the initial state y0 column vector only?

조회 수: 2 (최근 30일)
Qiaoli Ji
Qiaoli Ji 2017년 11월 22일
댓글: Qiaoli Ji 2017년 11월 22일
function dy = rigid(t,y)
dy = zeros(3,1); % a column vector
dy(1) = y(2) * y(3);
dy(2) = -y(1) * y(3);
dy(3) = -0.51 * y(1) * y(2);
options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
[T,Y] = ode45(@rigid,[0 12],[0 1 1],options);

채택된 답변

Walter Roberson
Walter Roberson 2017년 11월 22일
No, you can use row vector initial state. The output of the ode function must be a column vector though.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 常微分方程에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!