Info

This question is closed. Reopen it to edit or answer.

what is the solution of this error?

2 views (last 30 days)
Adham Shahin
Adham Shahin on 18 May 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
Capture.JPG

Answers (1)

Star Strider
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.

Community Treasure Hunt

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

Start Hunting!