필터 지우기
필터 지우기

How to know which if is 'triggered''?

조회 수: 2 (최근 30일)
Gustavo Araujo
Gustavo Araujo 2021년 1월 12일
댓글: Gustavo Araujo 2021년 1월 12일
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
Walter Roberson
Walter Roberson 2021년 1월 12일
What does isempty(g_ant, 'return1') mean to you?
Gustavo Araujo
Gustavo Araujo 2021년 1월 12일
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.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by