why this happen in diary?

hello guys i am quiet new in matlab i have problem in my code
%% Define Parameters
diary on
disp('Analysis on PD Data')
diary('c:\M_Figures\sample\CommandWindow')
when i run the code the program say got error in diary i dont why,plz help my guys,thanx i took this code from my friend.

2 Comments

@badr omar: please show us the complete error message. This means all of the red text.
these are the massages
Error using diary c:\M_Figures\sample\CommandWindow: Can't open file.
Error in Q1condition1 (line 15)
diary('c:\M_Figures\sample\CommandWindow')
i tries many things but still not working

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 8 Jul 2016

0 votes

Rather than writing to the Command Window and saving the diary, it would be easier if you saved the results of your computations from within your script. There are several options, including save (to save it to a .mat file, the easiest), dlmwrite (to write it to an ASCII-delimited text file), writetable if your data are in a table, and others.

Categories

Tags

Asked:

on 8 Jul 2016

Commented:

on 10 Jul 2016

Community Treasure Hunt

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

Start Hunting!