I have a function, which takes reminder of time from total time set. What I am trying to do is whenever my cyc = 0 at that instant only the input B of function should be changed. Also, at that instant the time t should reset and start from 0.
Can anyone guide me on how should I do it?
Thanks

 채택된 답변

VBBV
VBBV 2022년 11월 11일
편집: VBBV 2022년 11월 11일
B = 1; % usual input B value
if cyc == 0
B = 3; % input a different B value when cyc = 0
y = myFun(B)
time = 0;
end
function y = myFun(B)
% your function code
end

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2022a

태그

질문:

2022년 9월 13일

편집:

2022년 11월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by