The values of the "a" and "c" properties must be matrices with the same number of columns.

13 views (last 30 days)
Error using ss (line 345)
The values of the "a" and "c" properties must be matrices with the same number of columns.
A=[-0.0895 -0.286 0;-0.0439 -0.272 0;0 1 0]
A =
-0.0895 -0.2860 0
-0.0439 -0.2720 0
0 1.0000 0
>> b=[0.0145;-0.0122;0]
b =
0.0145
-0.0122
0
>> c=[0;0;1]
c =
0
0
1
>> d=[0]
d =
0
sys=ss(A,b,c,d)
Error using ss (line 345)
The values of the "a" and "c" properties must be matrices with the same number of columns.

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 3 Oct 2020
Edited: KALYAN ACHARJYA on 3 Oct 2020
Error clearly stated that A and c state-space matrices to be same number of columns to avoid this error.
A=[-0.0895 -0.286 0;-0.0439 -0.272 0;0 1 0]
b=[0.0145;-0.0122;0]
c=randi(5,[2,3]); % Changed here for test
d=[0]
sys=ss(A,b,c,d)

Community Treasure Hunt

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

Start Hunting!