hi, i did GUI for image processing using matlab to see the running time. but i cannot show the running time in the gui, its only shown in the matlab command window. can anyone show me how to make it? please help me :(
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
nuh lili
el 7 de Mzo. de 2018
Comentada: Image Analyst
el 8 de Mzo. de 2018
this is my GUI, and i want to show my total running time for the image to appear in this gui.
0 comentarios
Respuesta aceptada
Image Analyst
el 8 de Mzo. de 2018
Try this in your pushbutton callback
startingTime = tic;
% some image processing code...
elapsedTime = toc(startingTime);
handles.edit1.String = sprintf('%.2f', elapsedTime);
Instead of edit1, use whatever you have for the "Tag" property of the edit box.
4 comentarios
Image Analyst
el 8 de Mzo. de 2018
Look at my code again. It gets the elapsed time and sends it to your edit text box.
startingTime = tic;
% some image processing code...
J = 3;
a(1:N,1:M,1,1:J+1) = 0;
dx(1:N,1:M,1,1:J+1) = 0;
dy(1:N,1:M,1,1:J+1) = 0;
d(1:N,1:M,1,1:J+1) = 0;
elapsedTime = toc(startingTime);
handles.edit1.String = sprintf('%.2f', elapsedTime);
Más respuestas (1)
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!