To find union, intersection and complement of matrices > Matlab

To find union, intersection and complement of matrices > Matlab

Digital Signal Processing

Program:

u=input('Enter matrix data');
v=input('Enter second matrix');


w=max(u,v);
p=min(u,v);
q1=1-u;
q2=1-v;

display('Union of two numbers');
display(w);
display('Intersection of two matrices');
display(p);
display('Complement of first matrix');
display(q1);
display('Complement of second matrix');
display(q2);


OUTPUT:-
Enter matrix data[0.3,0.4]
Enter second matrix[0.1,0.7]
Union of two numbers

w =

    0.3000    0.7000

Intersection of two matrices

p =

    0.1000    0.4000

Complement of first matrix

q1 =

    0.7000    0.6000

Complement of second matrix

q2 =

    0.9000    0.3000

Comments

Popular posts from this blog

Intermediate Code Generation > C Program