フィルターのクリア

Having troubles with symbols in creating statespace model

1 回表示 (過去 30 日間)
Joseph
Joseph 2014 年 12 月 1 日
回答済み: Star Strider 2014 年 12 月 1 日
here is my code and error:
clc
clear
syms a L
A = [-10 0 -10/a; 0 0 1;-6/a -70/a^2 -14.4/a^2];
B = [10 ;0 ;6/a];
C = [0 0 1/a; 0 25 3];
D = [0; 0];
Ceq = charpoly(A)
sys = ss(A,B,C,D)
Error using ss (line 260)
The value of the "a" property must be a numeric array
without any Inf's or NaN's.
Error in Project_1 (line 10)
sys = ss(A,B,C,D)

回答 (1 件)

Star Strider
Star Strider 2014 年 12 月 1 日
The Control System Toolbox wants only numeric functions, so you have to define a numeric value for ‘a’.
You can calculate the output symbolically:
y = ((C*expm(A*t)*B)+D)*u
but the output is too long to fit into the Command Window, giving a long (incomplete) symbolic expression followed by ... Output truncated. Text exceeds maximum line length of 25,000 characters for Command Window display..

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by