Effacer les filtres
Effacer les filtres

how is keep the output values in program?

2 vues (au cours des 30 derniers jours)
Erkan le 10 Fév 2022
Commenté : Erkan le 11 Fév 2022
Hi everybody, I ran the a program and got the results. After making a change in the same program, I ran it again and got the results. How can I compare the first results with the second results? i.e. how can I keep the first results?

Réponses (1)

AndresVar le 11 Fév 2022
you can use save and load, here is a quick example:
% run once, save results
x = 1;
y = x+1;
% modify and run again, save results
x = 1;
y = x+2;
% later...
data1 = load("case1.mat");
data2 = load("case2.mat");
% then data1.y = 2 and data2.y=3
See the documentation on save and load for more uses
  3 commentaires
Erkan le 11 Fév 2022
thanks for answer
Erkan le 11 Fév 2022
my results are a vector in the size 1x3000 and when i appoint to another variable, i don't see the results

Connectez-vous pour commenter.


En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by