Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Experiment1.

Name: Amit UID: 21BCS7740


Branch: BE-CSE Section/Group:SC_905-A
Semester: 6 Date of Performance:16/01/2024
Subject Name: Soft Computing Lab Subject Code:21CSP-377

1.Aim: To perform Union, Intersection and Complement operations.

2.Objective: Write a program in MATLAB to perform Union, Intersection and


Complement operations.

3.Script and Output:


x=input('Enter First Matrix');
y=input('Enter Second Matrix');

u=max(x,y);
v=min(x,y); w=1-x;
x=1-y;
display('NAME: Amit // UID: 21BCS7740 ')
display('Union Of Two Matrices : '); display(u);
display('Intersection Of Two Matrices : ');
display(v);
display('Complement Of First Matrix : ');
display(w);
display('Complement Of Second Matrix : ');
display(x)
- CHANDIGARH
UNIVERSITY

You might also like