Matlab plots
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi All
I need to use matlab and make plots. I am able to access my work computer form home using ssh and i did try opening matlab but it said that i cannot see the display. so how do i use matlab if i cannot see it , is there any code or command that i can use to run script and get plots
Thank you
1 comentario
Kaustubha Govind
el 22 de Jul. de 2011
If you need to get plots, I think you need to enable display for MATLAB (if you just need to run scripts, you can run MATLAB using the -nojvm and -nodesktop options to disable display). I would recommend looking into VNC software or xterm so you can use display.
Respuesta aceptada
Robert Cumming
el 22 de Jul. de 2011
As stated run with -nodesktop to get just the command window. It will be a bit more involved to produce plots as you will need to build dialogs and axes manually (but hidden, i.e. visibility set to off) some sample code to produce plots in pdf format:
d = dialog ( 'windowstyle', 'normal', 'visible', 'off' )
a = axes('parent', d );
plot ( a, rand(10,1), rand(10,1) );
print ( d, '-dpdf', 'tmp.pdf' );
exit
run by running at command line:
matlab -nodesktop < filename.m
EDIT: Forgot to add that you can then use ghostscript to combine all the individual pdfs into a single pdf.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown 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!