write a variant of fprintf
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Juan Cardelino
el 18 de Abr. de 2012
Comentada: Andrew Janke
el 31 de En. de 2020
Dear all, I'm trying to implement a logging facility. For that reason, I want to replace my current calls fprintf(log_fid,"some label: %d\n, some_var) for something like myfprintf("some label: %d\n, some_var) and then call fprintf from within myprintf. My problem is that I don't know how to specificy the variable arguments list, I've tried like this:
function myfprintf(varargin)
fprintf(log_fid,varargin)
end
but that obviously won't work. Any suggestions? Thanks in advance. Best regards, Juan
1 comentario
Andrew Janke
el 31 de En. de 2020
Hey, if you're doing logging in Matlab, consider trying my SLF4M framework instead of rolling your own: https://github.com/apjanke/SLF4M
Respuesta aceptada
Ver también
Categorías
Más información sobre Search Path en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!