I suppose it depends if you are talking about saving the pretty-printed output
or all of the data in the output arguments. If you're talking about the pretty
printed output, just use the FNAME input argument (see help runopf or help
runmarket for details). If you mean the contents of the output arguments, then
you use the SOLVEDCASE input argument to give the name of a casefile (if it
ends in .m, it will be text) in which to save the resulting solved case. For
other results, you'll need to do as you would with any other Matlab data
structures. You can use ...
save filename.txt varname -ascii -tabs
... to save an invidual matrix to a tab-delimited text file, but I'm not sure
if there is a way of converting a general data structure to a text file (check
the Matlab help/forums).
--
Ray Zimmerman
Senior Research Associate
211 Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645
On Apr 6, 2011, at 1:10 PM, Dailan Xu wrote:
> Dear Prof. Zimmerman
>
> How can I save the results of runmarket or runopf in a . txt file or excel
> file?
>
> Best Regards
>
> D. Xu