Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Use both GUI and script at the same time

Subject: Use both GUI and script at the same time

From: Carolina

Date: 11 May, 2014 09:46:06

Message: 1 of 1


I have a .m file (script) that is controlling a real-time robot.
What i do within this file is:

1- find a trajectory
2-infinite loop:
    read from robot
    update robot
    plot some stuff (basically I'm drawing a new point in each iteration that represents the position of the robot in a previously opened map, it's updating the map)
end of loop

What I want to do is to create a GUI that allows me to make the plots and see some values that the robot returns at the same time, in real time.

From what I read, MATLAB can't run both a script and a GUI at the same time.. I can make it plot in real time in the GUI but I can't seem to be able to update the values returned by the robot in text boxes in GUI..

Do I have to put it all in the same file or is there a way for the GUI and the script to work in separate files?

Thank you in advance!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us