Why does the timer object fail when I run MATLAB remotely through a text window?
Afficher commentaires plus anciens
I use telnet or ssh to log into a remote UNIX/Linux machine and run MATLAB on that machine. I only have a text-based window, and do not have X11 forwarding enabled for this connection (or I do not have an X-server running on my local machine).
When I run MATLAB, I see the following warning:
Warning: Unable to open display , MATLAB is starting without a display.
You will not be able to display graphics on the screen.
While running MATLAB, issuing a command such as FIGURE does not produce any output on the screen.
I then create a timer object and start it as shown below:
a=1;
t=timer('TimerFcn','a=5','Period',2,'ExecutionMode', 'fixedRate');
start(t)
The "TimerFcn" is never executed as I can verify by checking the value of the variable "a" at any point after the timer has been started. In other words, the following command typed at the MATLAB prompt:
a
will produce
a =
1
whereas it should return a value of 5 for "a", since I expect the "TimerFcn" to execute at least once at this point.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Entering Commands dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!