the state representation of the dynamic system

조회 수: 1 (최근 30일)
belal hariz belgacem
belal hariz belgacem 2019년 6월 6일
댓글: Walter Roberson 2019년 6월 6일
clear all
clc
k=2; k1=0.5; L=0.02;
R=2; J=0.0005; f=0.00008;Cr=20;
A=[-f/J k1/J;(-k-k1)/L -R/L];
B=[0 -1/f;k/L 0];
C=[1 0;0 1];
x=[1;1];
D=[0];
t=0:0.1:7;
[x,y]= lsim(A,B,C,D,);
Error using lsim (line 105)
Wrong number of input arguments.
Error in Untitled (line 11)
[x,y]= lsim(A,B,C,D,t);
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 6월 6일
sys = ss(A, B, C, D);
[Y,T,X] = lsim(sys, U, t(:), x);
However this requires that you have a U array of inputs, that is length(t) x input channels, of inputs.Your system has two input channels so you might need x.' to make it into a row.

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

답변 (0개)

카테고리

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

제품


릴리스

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by