integral of a complecated long expersion

1 view (last 30 days)
could you correct my code I am trying to calculate integral of a 40*40 matrix with symbolic elements, I wrote with int a code but it doesn't solved my code
clc
clear all
close all
aa=zeros(4,4); aA=zeros(4,4); for k=1:4 for j=1:4 if k==j-1 aa(k,j)=1; else aa(k,j)=0; end aA(k,j)=sqrt(j-1).*aa(k,j); end end bb=zeros(10,10); bA=zeros(10,10); for k=1:10 for j=1:10 if k==j-1 bb(k,j)=1; else bb(k,j)=0; end bA(k,j)=sqrt(j-1).*bb(k,j); end end a=kron(aA,eye(10,10)); aDag=kron((aA)',eye(10,10)); b=kron(eye(4,4),bA); bDag=kron(eye(4,4),(bA)');
syms x y z w DDag=exp(-(y+1i*x)*a + (y-1i*x)*aDag )*exp(-(w+1i*z)*b + (w-1i*z)*bDag );
mu=[y -x w -z]; muT=transpose(mu) VV=[0.500159 2.40152*10^-6 -0.00126246 0.000205585 2.40152*10^-6 0.500135 -0.000224612 0.00802958 -0.00126246 -0.000224612 0.471411 -1.52749*10^-6 0.000205585 0.00802958 -1.52749*10^-6 0.656821];
phi=exp(-muT*VV*mu);
RHOywz = int(phi*DDag,'x', [-1 +1]); RHOwz = int (RHOywz,'y', [-1 +1]); RHOz = int (RHOwz,'w', [-1 +1]); RHO = int (RHOz,'z', [-1 +1]);
I also try to use integral or trapz but It doesn't solve a and adag are 40*40 matrixs.

Answers (0)

Community Treasure Hunt

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

Start Hunting!