??? Subscripted assignment dimension mismatch. Error in ==> FTCS at 14 T(:,1)=sin((pi*x)/L); >>

1 view (last 30 days)
bold

Answers (1)

Walter Roberson
Walter Roberson on 28 Aug 2015
Possibly: L is a scalar and x is a vector that is not the same length as size(T,1) so the calculated result does not fit into T(:,1)
Possibly: L is a scalar and x has 2 or more dimensions, so the shape of x is wrong to fit into the vector T(:,1)
Possibly: x and L are both vectors or arrays whose second dimensions happen to be equal; the result of the "/" matrix division operator will be size(x,1) by size(L,1), and that size does not fit into the vector T(:,1) . If x and L happen to be vectors of exactly the same length then probably the ./ operator should have been used instead of the / operator

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!