You are on page 1of 1

//Onima Bisht

//671
//To find the commutator.
clc;clear;
a=[1,0;0,-1]
D=[2;0]
X=[poly([0;1],'x','coeff'),0;0,poly([0;1],'x','coeff')]
L=[(poly([0;1],'x','coeff'))*2-2*%i;0]
B=(X*(a*D)-(L))
disp(B)

OUTPUT

Real part

Imaginary part

You might also like