이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
INNER DIMENSIONS MUST AGREE
조회 수: 1(최근 30일)
Hi, I am having trouble in my code as I am trying to solve set of ODE`s and Exponential equations all 9 of them are dependent on each other and need to be solved simultaneously. Please someone see through it and help me. I am attaching my code.
Muhammed Fasil 2016년 4월 28일
In an assignment A(:) = B, the number of elements in A and B must be the same.
Error in Untitled (line 146) SOM(i+1) = SOM(i)+(s1+(2*s2)+(2*s3)+s4)*(h/6);
Walter Roberson 2016년 4월 28일
Your function handles for S and U and W involve the vector Y, so each place that it appears that you are calculating a scalar in the loop, s1, s2, and so on, you are calculating a vector; the one exception is t1. You can index that vector afterwards, but if you are going to be doing that you should be asking why you are calculating the entire vector: it probably indicates a logic error in your code.