Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to make a text figure close after an input command, how do I also make a text figure show up after an input command

1 visualización (últimos 30 días)
Im making a new script and I don't have experience at all. Im trying to make a figure close after an input command. Here is my code:
x = {'Choose the number you would like to solve'; '1 = Kinetic Energy';'2 = Potential Energy';'3 = Net Force';'4 = Velocity/Time/Distance';'5 = ';'6 = ';'7 = ';'8 = ';'9 = ';'10 = '};
y = strcat(char(183), x);
figure
uicontrol('style','text','position',[0,210,500,200],'string',y,'fontsize',12)
choice = input ('Press the number you like to solve for ')
I don't know what to type next after this to make the figure close

Respuestas (1)

Ameer Hamza
Ameer Hamza el 26 de Sept. de 2020
You can use close()
x = {'Choose the number you would like to solve'; '1 = Kinetic Energy';'2 = Potential Energy';'3 = Net Force';'4 = Velocity/Time/Distance';'5 = ';'6 = ';'7 = ';'8 = ';'9 = ';'10 = '};
y = strcat(char(183), x);
f = figure
uicontrol('style','text','position',[0,210,500,200],'string',y,'fontsize',12)
choice = input ('Press the number you like to solve for ')
close(f);

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by