Borrar filtros
Borrar filtros

How to know which if is 'triggered''?

2 visualizaciones (últimos 30 días)
Gustavo Araujo
Gustavo Araujo el 12 de En. de 2021
Comentada: Gustavo Araujo el 12 de En. de 2021
Hello everyone!
I have a script which has 6 possibles (and random) cases, and I want to know exactly when each case was 'triggered' randomly. I tried something using return and disp inside the if, but unsuccessfully.
There is a part of my code:
function [Rarc,R2] = fcn1(Varc,Iarc)
switch selection
case 1
if isempty(g_ant, 'return1')
[...]
disp(return1)
end
Is there any easy solution?
Thank you all in advance.
  2 comentarios
Walter Roberson
Walter Roberson el 12 de En. de 2021
What does isempty(g_ant, 'return1') mean to you?
Gustavo Araujo
Gustavo Araujo el 12 de En. de 2021
Oh, I forgot to mention that is a Matlab Function Block, inside a simulink simulation. Means that if the variables that I call below this part, some variables will be assigned.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by