Info

This question is closed. Reopen it to edit or answer.

Save workspace output to a file, part 2

1 view (last 30 days)
alpedhuez
alpedhuez on 31 May 2018
Commented: alpedhuez on 31 May 2018
Suppose I have a code as follows
a=1;
fprintf('value of a is %f \n',a)
b=2;
fprintf('value of b is %f \n',b)
Then I have
value of a is 1.000000
value of b is 2.000000
on the command window. I would like to have something in the script that would save these two sentences in a text file. Please advise the steps.

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!