You haven't provided me with the error message. As I suggested, please read
help runopf for the correct calling syntax (I'm assuming dailan is not a valid
MATPOWER options vector). Here's an example:
r = runopf('case9', [], 'output.txt', 'solved_case.m');
By the way, you need to subscribe to the MATPOWER-L list before you can post
... see the instructions at the bottom of the MATPOWER home page.
--
Ray Zimmerman
Senior Research Associate
211 Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645
On Apr 6, 2011, at 4:47 PM, Dailan Xu wrote:
> Thank you very much.
>
> I want to have the results of runopf of case9. But when I execute
> runopf('case9',dailan),for example the name dailan, it doesn't work. Could
> you please give me an example because I don't know where is the error?
>
> My mean is this I want to have the result in a file so that I can convert it
> to a excel file.
> Best Regards
>
> D. Xu
>
>
>
> On Wed, Apr 6, 2011 at 21:13, Ray Zimmerman <[email protected]> wrote:
> 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
>
>