photo

Nana


North Carolina A&T State University

2011년부터 활동

Followers: 0   Following: 0

메시지

I copied this

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);
plot(T,Y(:,1),'-',T,Y(:,2),'-.',T,Y(:,3),'.')

and tried to run but it gave error message "??? Input argument "y" is undefined.

Error in ==> rigid at 3
dy(1) = y(2) * y(3);

What should be the problem?

통계

MATLAB Answers

1 질문
0 답변

순위
259,048
of 300,759

평판
0

참여
1 질문
0 답변

답변 채택
0.0%

획득한 표
0

순위
 of 21,081

평판
N/A

평균 평점
0.00

참여
0 파일

다운로드 수
0

ALL TIME 다운로드 수
0

순위

of 170,900

참여
0 문제
0 답안

점수
0

배지 수
0

참여
0 게시물

참여
0 공개 채널

평균 평점

참여
0 하이라이트

평균 좋아요 수

Feeds

보기 기준

질문


Example in your ode45 tutorial is not running
I have the same problem trying to solve 3 nonlinear differential equations for my modeling. I tried to run your own tutorial ex...

14년 초과 전 | 답변 수: 2 | 0

2

답변