0

There is a continuous-time system shown below: enter image description here enter image description here

The matlab codes are:

t=0.01;
syms s;
a2=[0 0 -285.7143;0 -0.4533 9.0662;5.2650 -5.2131 -42.5958];
b2=[571.4286;0;82.5714];
c2=[1 0 0];
A2=expm(a2*t);
B2=(int(expm(a2*s),0,t)*b1);

However, when I calculate B1, the computer displays 'output truncated'.

please help me.

thanks a lot.

Vahid
  • 312
  • 3
  • 13

1 Answers1

0

I don't think it's necessary to use symbolic math for this integral of a matrix-valued function. Instead, you can use integral with the 'ArrayValued' option:

t = 0.01;
a2 = [0 0 -285.7143;
      0 -0.4533 9.0662;
      5.2650 -5.2131 -42.5958];
integral(@(s)expm(a2*s),0,t,'ArrayValued',true)

This is much faster and returns a result very similar to syms s; double(int(expm(a2*s),s,0,t)) (ignore the minuscule imaginary parts due to numerical error). See also this question.

Community
  • 1
  • 1
horchler
  • 18,384
  • 4
  • 37
  • 73