Info
This question is closed. Reopen it to edit or answer.
what is the solution of this error?
2 views (last 30 days)
Show older comments
Answers (1)
Star Strider
on 18 May 2019
This assignment:
t(1,:) = 20;
creates a (1x1) value for ‘t’, so in this assignment:
t(j+1) = 60*t(j,2)-59*t(j,1)+300;
‘t(j,2)’ does not exist.
One possible solution is to preallocate ‘t’ as:
t = zeros(100,2);
t(1,:) = 20;
before the loop.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!