Borrar filtros
Borrar filtros

How to change automatically the name of the title ?

2 visualizaciones (últimos 30 días)
Momo
Momo el 23 de Abr. de 2018
Abierta de nuevo: Momo el 24 de Abr. de 2018
I'm trying to compute a system of ODE by using different solvers.How to change the legend and title automatically depends on solvers(i)? I want to plot a graph for each solver.

Respuesta aceptada

Jeff Miller
Jeff Miller el 23 de Abr. de 2018
Looks like you need a "figure;" command inside the loop to start a new figure window for each solver. I think you are now drawing all plots in the same window, so you only see the last one.
  1 comentario
Momo
Momo el 23 de Abr. de 2018
yeah, you are right I forgot to add figure(i), thank you so much

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 23 de Abr. de 2018
title(solvers{i});
legend('Exact Solution', solvers{i});

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by