How to save ans workspace of a Function

Dear All, I have A function that reads a file, when I use it it succeed to read the file but it put it in a workspace with the name "ans".
Can I save this to output txt file ??

 Réponse acceptée

Walter Roberson
Walter Roberson le 29 Juil 2018
output = NameOfYourFunction(whatever, arguments, are, appropriate, go, here);
save('NameOfOutputFile.txt', 'output', '-ascii', '-double');

Plus de réponses (1)

Mohamed Gamal
Mohamed Gamal le 31 Juil 2018

0 votes

Dear Walter Thank you for the information it works:)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by