MATLAB Answers

could anyone tell me how to save the values while the code is getting executed

1 view (last 30 days)
Prabha Kumaresan
Prabha Kumaresan on 1 Jun 2018
Answered: Aakash Deep on 1 Jun 2018
could anyone tell me how to save the values while the code is getting executed

  0 Comments

Sign in to comment.

Answers (2)

Anton Semechko
Anton Semechko on 1 Jun 2018
save('FileName.m','name_of_variable_you_want_to_save')

  0 Comments

Sign in to comment.


Aakash Deep
Aakash Deep on 1 Jun 2018
Use save command to save the current value of the variable.
save filename variable1
This will create .mat file (for this, filename.mat) in your current working directory. If you want to store multiple variables in a single file, you can do it by adding variable name in the same command.
save filename var1 var2 var_n
It is good when the value of the variable is changing.

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags


Translated by