I use EViews7(Enterprise version).
When I call Matlab in my program with command "xopen(type=m)",
a window "X Log: MATLAB OUTPUT" open.
I would like to save this X Log as a text file in my program.
If you know a command or other better way, please let me know?
Thanks.
save X Log (MATLAB OUTPUT)
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: save X Log (MATLAB OUTPUT)
You ought to be able to get something using the Matlab diary() command.
Re: save X Log (MATLAB OUTPUT)
Thank you for your reply.
I tried diary() command, but empty file was only created.
I think this is becase diary() command records matlab command window, not X Log.
When I run my program, command history is written in X Log(EViews Window) not matlab command window.
My EViews program is as follows, is my use of diary() command wrong?
---my EViews program
xopen(type=m, case=lower)
xrun "diary matlablog.txt"
xrun "run ('main.m')"
xclose
---
I tried diary() command, but empty file was only created.
I think this is becase diary() command records matlab command window, not X Log.
When I run my program, command history is written in X Log(EViews Window) not matlab command window.
My EViews program is as follows, is my use of diary() command wrong?
---my EViews program
xopen(type=m, case=lower)
xrun "diary matlablog.txt"
xrun "run ('main.m')"
xclose
---
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: save X Log (MATLAB OUTPUT)
Sorry. That was my only guess.
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: save X Log (MATLAB OUTPUT)
There's an undocumented feature that is similar to the LOGSAVE function for program output.
The command is XLOGSAVE. To save the X LOG output as a text file ("text" is the default type), do this:
To save as a Rich Text format (which retains all the color formatting), do this:
To save the output as a text object in the current workfile, do this:
This command will always overwrite the destination file/object if it already exists.
One thing to note is that there is currently a bug with this command -- it's supposed to let you put quotes around the destination filename so that you can specify spaces in the path, but this doesn't work. We'll have this fixed in the next patch. For now, just use a path without any spaces.
Steve
The command is XLOGSAVE. To save the X LOG output as a text file ("text" is the default type), do this:
Code: Select all
XLOGSAVE(type=text) c:\files\output.txtCode: Select all
XLOGSAVE(type=rtf) c:\files\output.rtfCode: Select all
XLOGSAVE(type=textobj) xoutputOne thing to note is that there is currently a bug with this command -- it's supposed to let you put quotes around the destination filename so that you can specify spaces in the path, but this doesn't work. We'll have this fixed in the next patch. For now, just use a path without any spaces.
Steve
Re: save X Log (MATLAB OUTPUT)
Thank you so much, Mr.Steve.
I'll try it.
> Startz
I'm sorry, my English isn't very good.
Thank you, too.
I'll try it.
> Startz
I'm sorry, my English isn't very good.
Thank you, too.
Who is online
Users browsing this forum: No registered users and 2 guests
