This question is closed. Reopen it to edit or answer.
Need help understanding error PLEASE
1 view (last 30 days)
Srivardhan Gadila on 30 Apr 2020
Below is the code from lines 142-147
plot(x,U, '-ob '); axis([0 x(n) -UMax UMax]); drawnow;
xlabel(' x nodes '), ylabel(' Temperature ')
plot(xc,F, '--V'); axis([0 x(n) -Fmax Fmax]); drawnow;
When running the code, in the 5th iteration the value of Fmax is NaN and Fmax is used in line 144 in the axis limits which is causing the error.
Try checking the value of Fmax in each iteration by removing the semicolon in line 142 i.e.,