필터 지우기
필터 지우기

how does work S-Function block in simulink?

조회 수: 1 (최근 30일)
Ted
Ted 2013년 2월 26일
Hi dears, I know that S-Function block is an outdated block in simulink. but I need to understand how it works because I have to decode an old file. The used code in this s-function is like below. If I enter constant value, a curve is seen,that differences from zero up to the stated value. I dont know what happen on entrance data. any idea?
Thanks a lot, Javad
function [sys,x0] =FT_Ball(t,x,u,flag)
kb=12;
switch flag
case 1
sys(1)=x(2);
sys(2)=x(3);
sys(3)=kb^3*u - 5*kb*x(3) - 6*kb^2*x(2)-kb^3*x(1);
case 3
sys(1)=x(1);
case 0
sys=[3,0,1,1,0,0];
x0=[0,0,0];
case {2,4,9}
sys=[];
end

답변 (1개)

TAB
TAB 2013년 2월 26일
  댓글 수: 1
Ted
Ted 2013년 2월 26일
Thanks ... but I cant understand explains clearly. Can you explain the notes according to my code ,please.

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

카테고리

Help CenterFile Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by