2

I have question about how I can save the result of function

I have function returns two output , and this function in for loop so the value of output is changes .how I can save this output in folder.

1
  • Get the output in each iteration, and append it each time to another matrix. When the loop is done, save the matrix you were appending to with the save command - give it the -ascii option if you want to save it as ASCII data. Commented May 17, 2012 at 18:15

2 Answers 2

2
for i=1:N
   [out1 out2] = myfun();
   name = ['mySaveNumber_' num2str(i)];
   save(name);
end
Sign up to request clarification or add additional context in comments.

2 Comments

Thank u Sevenless ....But when i try ur code it does not work ..I get error at name=[]
Thank u . I just change the folder name
0

SELECT -> copy -> paste your output in a text file (it means i dont get your question)

1 Comment

I do not want to use copy and paste I want to use save in matlab to save the function output at every iteration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.