Why my program always get '0' at initialization?
이전 댓글 표시
function out=gett(A)
if A(1)==0
out=1;
else
out=0;
end
A(1)
end
My M-file Integrator block :initial condition=-2
Why my program always get '0' at initialization?
but workspace is correct output.
How should I avoid this case?



%
답변 (1개)
Azzi Abdelmalek
2013년 1월 26일
편집: Azzi Abdelmalek
2013년 1월 26일
Your Matlab function is not an integrator, your output signal is 0 or 1
if A(1)==0
out=1;
else
out=0;
end
댓글 수: 3
YEH
2013년 1월 26일
Azzi Abdelmalek
2013년 1월 26일
You are displaying the output of the matlab function. According to your code it is 0 or 1
YEH
2013년 1월 27일
카테고리
도움말 센터 및 File Exchange에서 Debugging and Analysis에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!