How to correctly plot the error of a numerical algorithm ?

5 visualizaciones (últimos 30 días)
I would like to display the error made after the insertion of each approximation point in my numerical algorithm. Here is the plot that I get:
I don't want to display the error like that, since it is not clear how the value of it changes after the insertion of each point. I'd like to plot the error this way (picture taken from a paper):
In other words, I want the Y Axis to contain values from 10^(-1) to 10^(-6)
Here is the code that I use:
rms_res = norm(residual)/sqrt(lres);
errors = [errors rms_res];
% some code for other computation
% plot
plot(coord_ctrs, (errors), '.');
line(coord_ctrs, (errors));
How can I do that ?
Thank you.

Respuesta aceptada

the cyclist
the cyclist el 10 de Sept. de 2021
You can use the semilogy function instead of the plot function..
  2 comentarios
Yassine El Baaj
Yassine El Baaj el 10 de Sept. de 2021
thank you, it worked!
Image Analyst
Image Analyst el 10 de Sept. de 2021
@Yassine El Baaj, please click the "Accept this answer" link to @the cyclist can get credit (reputation points) for it. Thanks in advance.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by