How can i implement a clock series?
조회 수: 1 (최근 30일)
이전 댓글 표시
This is my code i used for matlab function block and it goes straight to scope .But it does not work in the scope.
function [Th1,Th2] = fcn(t)
if (0<t)&&(t<10)
Th1 = 0;Th2=0;
elseif (10<t)&& (t<11.2)
Th1 = 100;Th2=100;
elseif (11.2<t)&&(t<12.5)
Th1 = 100;Th2=50;
elseif (12.5<t)&&(t<13)
Th1 = 80;Th2=53;
elseif (13<t)&&(t<13.8)
Th1 = 60;Th2=36;
elseif (13.8<t)&&(t<25.1)
Th1 =100;Th2=100;
elseif (25.1<t)&&(t<26)
Th1 = 55;Th2=100;
elseif (26<t)&&(t<33.5)
Th1 = 0;Th2=10;
elseif (33.5<t)&&(t<50)
Th1 = 0;Th2=0;
else
Th1 = 0;Th2=0;
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Clocks and Timers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!