Why is the vector length 7?

조회 수: 3 (최근 30일)
Tallha Khan
Tallha Khan 2017년 12월 31일
답변: Walter Roberson 2017년 12월 31일
Learning Matlab through some simple plotting questions.
Why is the error message shown?, I don't see how Q3 has a vector length of 7. (See attached image)

채택된 답변

Walter Roberson
Walter Roberson 2017년 12월 31일
What you coded as x inside your function is a vector of initial conditions, not (just) the current location on the x axis. Each place you referred to x without a subscript, you are getting the vector of length 3. You do that twice, and you have one element that does not use x, so you have an output which is 3+1+3 = 7 long.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by