MATLAB integration of 2x2 system

88 views Asked by At

I got the following matrice:

enter image description here

which I want to integrate with MATLAB. The obvious solution would be:

enter image description here

which is exactly what I am trying to achieve. I am using symbolic calculation for this. (example only for one variable)

syms aiso w w1 w2

With the matrice definition

A = [1/2/aiso 1/2; -1/2/aiso 1/2];

Now I integrate symbolically via

A = int(A,w);

Which gives me the result

A = [ w*1/(2*aiso), w*1/2; -w*1/(2*aiso), w*1/2]

That is obviously right but since I only used one symbolic variable that's not quite the case I need. I need the solution from above, which is stated in vector notation on the second picture and which should look like this in MATLAB:

A = [ (w1)*1/(2*aiso) + (w2)*1/2; (w1)*1/(2*aiso) - (w2)1/2]

Is there a way to do this in MATLAB?

Thanks a lot in advance and have a nice day!

1

There are 1 answers

4
Banghua Zhao On

You can integrate each component of the matrix dA to get A:

syms aiso w w1 w2
dA = [1/2/aiso 1/2; -1/2/aiso 1/2];
A = [int(dA(1,1),w1)+int(dA(1,2),w2) int(dA(2,1),w1)+int(dA(2,2),w2)]
disp(A)

Output:

[ w2/2 + w1/(2*aiso), w2/2 - w1/(2*aiso)]

It is not elegant but it works.