MATLAB: Hi PLEASE read the following question

MATLABworkspace

hi I am current doing research in Matlab where I use a function with some input parameters gives me an output in workspace , every time I input different parameters it replaces the previous output in workspace . In this case I just want to use different parameters but still want the different outputs of that function by naming them differently in workspace is that possible please let me know and it is a loop function.

Best Answer

[a, b, c] = myFunction( ... );
[d, e, f] = myFunction( ... );
You have total control over the variables into which function outputs go. Just use different ones for a second call. Although if you are doing many calls in a loop you would want to put the results in arrays rather than individually named variables like that.