Diary is not saving all outputs
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ali Komai
el 4 de Ag. de 2018
Comentada: Ali Komai
el 7 de Ag. de 2018
Outputs from the mainscript with fprintf and disp are not saved in the diary BUT if this outputs come from a function they are saved. Is there an option to make the diary also save outputs from the mainscript?
2 comentarios
Jan
el 4 de Ag. de 2018
What is a "main script"? Can you post some code which reproduces the observation?
Respuesta aceptada
Jan
el 6 de Ag. de 2018
I'm using a dedicated function for this job. At first this function can open some "channels" for the output, e.g. the command windows and/or files. Afterwards I call this function for all output instead of disp or fprintf. Errors are caught by try/catch, such that there is no output of my code, which is not handles by this specific output function.
It is a lot of work to adjust the complete code to such an output function. But it is worth to have the complete power over where is written what, instead of relying on diary, which has some limitations in your case.
If you are working in the Matlab environment, not in a compiled application, you can use FileExchange: CmdWinTool to get the complete text of Matlab's command window:
Str = CmdWinTool('getText')
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!