Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Need help understanding error PLEASE

1 visualización (últimos 30 días)
Triggs
Triggs el 27 de Abr. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
k

Respuestas (1)

Srivardhan Gadila
Srivardhan Gadila el 30 de Abr. de 2020
Below is the code from lines 142-147
Fmax=max(abs(F))+1;
subplot(2,1,1)
plot(x,U, '-ob '); axis([0 x(n) -UMax UMax]); drawnow;
xlabel(' x nodes '), ylabel(' Temperature ')
subplot(2,1,2)
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.,
Fmax=max(abs(F))+1

La pregunta está cerrada.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by