A figure created within a for loop is not plotted (only the last one is shown)

2 vues (au cours des 30 derniers jours)
Hello! I have the code attached.
A figure created within a for loop (fig_2.png) is not plotted (only the last one figure is shown -> fig_5.png).
I would like to get the figure on the left (see bottom) but I actually get the figure on the right, that is, it is missing the plotting of a curve (fig_2.png).
  3 commentaires
Mathieu NOE
Mathieu NOE le 5 Déc 2022
you can avoid the 10 files attachment limit by zipping all files , then you have again room for attaching 'CoordinateMatrix' data

Connectez-vous pour commenter.

Réponse acceptée

Mathieu NOE
Mathieu NOE le 5 Déc 2022
hello again
so there was some figure calls still present in some functions (fun1, fun2 ,...)
I cleaned that so you have only the 3D plot
check the updates in the zip attached
I created a function "codeMN.m" that I used for this correction, but you should use "code.m" on your side
hope it helps
  7 commentaires

Connectez-vous pour commenter.

Plus de réponses (1)

Jiri Hajek
Jiri Hajek le 5 Déc 2022
Hi, you need to use the hold function after you display the first curve.

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by