csim fail is the system has no state
Reported by Serge STEER
BUG DESCRIPTION:
----------------
csim returns an error if the system has no state
ERROR LOG:
----------
!--error 10000
csim: Wrong type for input argument #1: A SIMO expected.
at line 57 of function csim called by :
HOW TO REPRODUCE THE BUG:
-------------------------
S=ssrand(1,1,0);
t=0:5;
y=csim('step',t,S);
OTHER INFORMATION:
------------------
The problem is due to the instruction [ma,mb]=size(b) which returns [0 0] is there is no state while the number of inputs may be non zero
The solution is to replace this instruction by
ma=size(a,1);
mb=size(d,2);