Reset or clear property values in App Designer

조회 수: 90 (최근 30일)
Alejandro Fernández
Alejandro Fernández 2019년 11월 3일
댓글: Adam Danz 2019년 11월 3일
Hello, I would like to know if someone would know how I can do so that once I press a button all the values of the properties that I have created in my application are erased and also all the tables that I have put in my application are erased as well, that is to say, that everything would be as if I had just run the application again but without having to do it.
Thank you very much in advance.
properties (Access = private)
image1 % imagen que leemos al principio de todo
fullpathname % dirección en la que tenemos guardada nuesta image1
table_Hough_circulos % Description
dibuja % variable que se usa en la función busca_centro
coordenadas_pixel % Información de los puntos del contorno en coordenadas pixel
image_patron % Imagen a del patrón del escáner
matriz_coordenadas_u % Matriz que contiene datos en píxeles en las coordenadas u
matriz_coordenadas_v % Matriz que contiene datos en píxeles en las coordenadas v
puntos_compensados % Matriz que contiene los nuevos puntos compensados y en mm
rect2 % Posición del rectángulo de recorte
XCFit % Posición de la coordenada x del círculo de best fit
YCFit % Posición de la coordenada y del círculo de best fit
RFit % Valor del radio del círculo de best fit
THETAPA % Valor del ángulo de cada punto del círculo
puntos_compensados_00 % Matriz que contiene los nuevos puntos compensados y en mm referidos a el punto (0,0) en función de la aproximación al BestFit
datos_MMC % Almacenar datos de la máquina de medir por coordenadas
resultados_promediado % Resultados procedentes del promediado
MMC_C % Datos de la matriz de coordenadas de forma continua
MMC_D % Datos de la matriz de coordenadas de forma discreta
end

채택된 답변

Adam Danz
Adam Danz 2019년 11월 3일
편집: Adam Danz 2019년 11월 3일
The callback to your app button can do 3 things.
  1. Open a new instance of the app but make is invisible. All properties will be default.
  2. Close the current instance of the app
  3. Make the new instance visible.
Here's an answer to nearly the same question that demonstrates this callback function.
  댓글 수: 2
Alejandro Fernández
Alejandro Fernández 2019년 11월 3일
Thank you very much for the answer although I need you to do it in the same application, I can not open a new instance of it
Adam Danz
Adam Danz 2019년 11월 3일
An alternative is to reset all properties within your "reset" button callback function. You'll have to go through each app component and set the default properties.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by