Vikash Chandra - 13000119062
Vikash Chandra - 13000119062
VIKASH CHANDRA
13000119062
016384 OF 2019-20
CSE A
NAME OF THE PROGRAM: CSE DEGREE: B.Tech SEMESTER: 3rd COURSE CREDIT: 3
COURSE NAME: IT-Workshop (using MATLAB) CONTACT HOURS: 4P
COURSE CODE: PCC-CS393
COURSE TYPE: PRACTICAL
Exp. Week
List of Experiments
No. No.
Write MATLAB code to find the followings:
(i) Determination of inverse and determinant of a square matrix.
(ii) Transpose a given matrix.
(iii) Compute inner product of two vectors.
(iv) Find the trace of a square matrix. Week
1. (v) Find outer product of two vectors. 1
(vi) Eigenvalues and Eigenvectors of a square matrix.
(vii) Check whether a given matrix is orthogonal or not.
(viii) Check two vectors are Orthogonal or not.
(ix) Determine the eigenvalues of the inverse of a matrix
(x) Check whether eigenvectors of a symmetric matrix are orthogonal or not.
a) Write a script file that takes a string as input from the user and checks if the string is
a Palindrome or not and displays appropriate message for the user.
b) Write a function file that converts temperature in degrees Fahrenheit (F) to degrees Centigrade
Week
2. (C). Use input and fprintf commands to display a mix of text and numbers. Recall the
2
conversion formulation, C = 5/9 *(F - 32).
c) Write a user-defined recursive function in MATLAB, with one positive integer input
argument and one output argument to compute the Factorial of N.
a) Write a user-defined anonymous function in MATLAB, with one positive integer
input argument and one output argument to compute the Factorial of N.
b) Write a user-defined MATLAB function, with two input and two output arguments that
determines the height in centimeters (cm) and mass in kilograms (kg) of a person from
his height in inches (in.) and weight in pounds (lb).
Week
3. (i) Determine in SI units the height and mass of a 5 ft.15 in. person who weight 180 lb.
3
(ii) Determine your own height and weight in SI units.
c) Write a user-defined function in MATLAB, with one positive integer input argument and
one vector output argument to compute the Fibonacci series of N values.
d) Write a user-defined function in MATLAB, to computer prime numbers within given range
as input argument and returns a vector of results.
a) Write a script file in MATLAB to solve the following problem. Arnold buys three apples,
a dozen bananas, and one watermelon for Rs. 72.36. Deepika buys a dozen apples and two
watermelon for Rs. 115.26. Uttam buys two bananas and three watermelon for Rs. 42.77.
How much do single pieces of each fruit cost?
Note: Use Method 1 from the tutorial to solve this problem. Week
4.
b) Write a program to solve linear equations: 4
(i) 15x = 5y-8z
(ii) 9y+3z = x+6
(iii) 10x+4y-z = 7
Note: Use Method 2 from the tutorial to solve this problem.
Create a cell array, called studentData, of Names, Ages, and Total marks, e.g.,
studentData = {'Aamir', 7, 45;
'Mukesh', 18, 150;
'Anita', 64, 75;
'Raghav', 47, 200;
'Roshni', 36, 0};
a) Display the cell array using the MATLAB disp() function. How is the data in the cell
Week
5. array displayed?
5
b) Extract the container holding the first name (Aamir) using cell array indexing.
c) Extract the container holding Aamir’s age using cell array indexing.
d) Extract the numeric data for Aamir’s age using cell array indexing.
e) Add records for two more students in the above cell array.
f) Sort studentData in ascending order of Ages.
g) Extract Names column as a single vector.
h) Replace the Total marks for all students from figures to words (e.g. 45 should be replaced
with 'Forty five') in studentData.
a) Write a user-defined function in MATLAB, named printCellArray that takes a 2-D cell array
and displays the data in each container. You may assume that the cell array contains only scalar
data (no array, structure, structure array, cell, or cell array). Hint MATLAB’s size() function
works for cell arrays. For example for the cell array {10 37; 12 8; 2 46} should be displayed as
shown below,
10 37
12 8
2 46
Week
6.
b) Write a MATLAB script-file to read date of birth (dd, mm and yyyy separately) from user and 6
store in a cell array. The cell array should be arranged as an Nx3 cell array where column one
holds the day (dd), column two holds the month (mm) and column three holds the year (yyyy).
Finally, sort the newly created cell array in ascending order of year and print it on screen. The
output should be as shown in the following example,
20-05-1995
16-08-1997
12-12-2000
06-01-2010
a) Write a user defined function named createEmplyee that takes one input argument (N) and one
output argument (an EmployeeData structure array). The function will create a structure array
of EmployeeData consisting of Name, Designation, Age and Salary for N employees. It will
also check for the following validations while taking user input,
(i) Age cannot be less than 25 and greater than 60
(ii) Salary must be greater than 15000
Call the function with N = 5 to add atleast five employee records. Week
7.
7
b) Using the structure array of EmployeeData, created by the above function, do the following,
(i) Display the structure array with all fields for all employees.
(ii) Display all fields for only the last three employees.
(iii) Display only two fields, Name and Age for all employees.
(iv) Compute average age of all employees. [Do without using loop]
(v) Count number of employees who gets salary greater than 25000. [Do without using loop]
b) Write a user-defined function in MATLAB, with two string input arguments and one vector
output argument to search for the sub-string (second input) within the first input string and will
return the occurrences (starting indices) of the sub string within the first string. In case the
sub- string is missing within the first string 0 (zero) will be returned.
Write the following data into a file named as 'data.txt' and save it in your working directory.
Rainfall Data
Months: June, July, August
M = 3
12:00:00
June-2012
09:10:02
July-2012
15:03:40
August-2012
a) Create a single 2D plot consisting of 2 subplots. Plot the tan(x) function in one subplot.
The other subplot consists of the function y = e−3.5xsin(10x). Week
10.
b) Plot a bar chart where the X-axis consists of the months and the Y-axis consists of the 10
number of days present in that corresponding month.
Construct a cylinder with the radius function as 4*cos(t). Create four sub-plots in a 2-by-2 grid
within a figure window such that,
(i) One subplot contains the X coordinates of the cylinder.
Week
11. (ii) Second subplot contains the Y coordinates of the cylinder.
11
(iii) Third subplot contains the Z coordinates of the cylinder.
(iv) Fourth subplot contains the cylinder.
Hint: You can use either mesh() or surf() function.
Perform histogram equalization on an image in MATLAB. Display the image and the histogram. Week
12.
12
© Department of Page 3 of 37
CSE
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
Score CO
PO/P
Excellent Good Average Poor Absent Mapp
SO
Criteria (100%) (80%) (60%) (40%) (0%) ing
Mapp
ing
Students are Students are Students are Student is CO1, PO1,
able to able to identify able to not able to CO2, PO2,
identify the the problem/ identify the understand/ CO3, PO3,
problem/ analyze the problem/ analyze/desi CO4, PO4,
analyze the problem/Desig analyze the gn the CO5 PO5
problem/De n the solutions problem/Desi problem or
sign the and solve the gn the interpret the
solutions problem solutions and problem PSO2
and solve applying solve the into
the problem various problem specified
applying algorithms with applying language
various appropriate test various
algorithms cases; students algorithms
with are able to with
appropriate include appropriate
test cases; boundary test cases.
1. Lab students are conditions in
Particip able to the test cases.
ation include
boundary
conditions
in the test
cases;
students are
able to
modify the
program or
design as
per
requirement
of the
outcomes
from
boundary
conditions
(if any).
2. Effectiv Students are Students are Students are Students are CO1, PO1,
e able to able to exploit able to use not able to CO2, PO2,
utilizati exploit the the important specified use CO3, PO3,
on of full features of the tool/property/t tool/propert CO4, PO4,
© Department of Page 4 of 37
CSE
Techno
the potential of tool/property/to opic as per the
Main y/topic PO5
EM-4/1, Sector-V, Salt Lake City, Kolkata-
modern the pie under problem 700091 under
tools tool/propert consideration requirement consideratio
and y/topic for the only under n for the PSO2
their Rder specified consideration specified
properti consideratio language for the language
es, n for the specified
specified language
compile
language
US
Score
Excellent Good Average Poor Absent
Criteria (100%) (80%) (60%) (40%) (0%)
Students are Students are Students are Students are CO1,
able to able to work able to work not able to CO2, PO8
work ethically as an as an work CO3,
3. Individ effectively, individual or in individual or effectively, CO4,
sincerely a member of a in a member sincerely CO5, PSO2
ual or
and team of a team and
team
ethically as ethically as
work
an an
individual individual
or in a or in a
member of member of
a team a team
Students Students will Students will Students CO5 PO1,
will prepare prepare prepare will not PO2,
effective effective effective prepare PO3
documentati documentation documentatio effective
on of lab of lab classes n of lab documentati
classes mentioning classes on of lab PSO2
mentioning problem mentioning classes
4. Docum
problem statement, problem mentioning
entation statement, input-output, statement, objective,
input- test cases input-output input-
output, output, test
appropriate cases,
test cases boundary
with conditions
boundary
conditions
© Department of Page 5 of 37
CSE
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
ASSIGNMENT-1 700091
SOURCE CODE :-
a=[1 2;3 4]
I=inv(a)
D=det(a)
T=a'
r1=[1 2 3]
r2=[4 5 6]
inner=r1*r2'
tr=sum(diag((a)))
outer=r1'*r2
© Department of Page 6 of 37
CSE
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
%eigenvalues and eigenvectors of given matrix 700091
a=[1,2;3,4]
[v,d]=eig(a)
© Department of Page 7 of 37
CSE
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
SCREENSHOT:
© Department of Page 8 of 37
CSE
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 9 of 37
CSE
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 10 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
ASSIGNMENT-2
© Department of Page 11 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
1. Write a script file that takes a string as input from the user and checks if the string is a Palindrome or not and
displays appropriate message for the user.
2. Write a function file that converts temperature in degrees Fahrenheit (F) to degrees Centigrade (C).
Use input and fprintf commands to display a mix of text and numbers. Recall the conversion formulation, C = 5/9
*(F - 32).
3. Write a user-defined recursive function in MATLAB, with one positive integer input argument and one output
argument to compute the Factorial of N.
SOURCE CODE :-
PALINDROME NUMBER:
if string == fliplr(string);
else
end
TEMPERATURE CONVERTER:
function temperature
f = input('enter temperature in farenhite: ');
c = (5/9)*(f-32);
fprintf('\n\tThe temp. in celcius is %.2f\n', c);
endfunction
FACTORIAL NUMBER:
Factorial= fact(n);
function y=fact(n);
if n==0
© Department of Page 12 of
CSE 37
Techno
y = 1; Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
else
y= n .* fact(n-1);
end
end
SCREENSHOT:
© Department of Page 13 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
ASSIGNMENT-3 700091
1. Write a user-defined anonymous function in MATLAB, with one positive integer input
argument and one output argument to compute the Factorial of N.
2.Write a user-defined MATLAB function, with two input and two output arguments that
determines the height in centimeters (cm) and mass in kilograms (kg) of a person from his height
in inches (in.) and weight in pounds (lb).
a)Determine in SI units the height and mass of a 5 ft.15 in. person who weight 180 lb.
3.Write a user-defined function in MATLAB, with one positive integer input argument and one
vector output argument to compute the Fibonacci series of N values.
4. Write a user-defined function in MATLAB, to computer prime numbers within given range as
input argument and returns a vector of results.
SOURCE CODE:
FACTORIAL:
fact = @(n)prod(1:n);
SI UNITS;
FIBONACCI NUMBER
function v = fibonacci(n)
a=0;
b=1;
v=[a,b];
for i=1:n
sum=a+b;
v=[v,sum];
a=b;
b=sum;
endfor
endfunction
© Department of Page 14 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
PRIME NUMBER: 700091
function vector=prime(m,n)
vector=[];
for i=m:n
c=0;
for j=1:i
if rem(i,j)==0
c=c+1;
endif
endfor
if c==2
vector=[vector,i];
endif
endfor
endfunction
SCREENSHOT:
© Department of Page 15 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
ASSIGNMENT-4
© Department of Page 16 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
1. Write a script file in MATLAB to solve the 700091
following problem. Arnold buys three apples, a
dozen bananas, and one watermelon for Rs. 72.36. Deepika buys a dozen apples and two
watermelon for Rs. 115.26. Uttam buys two bananas and three watermelon for Rs. 42.77. How
much do single pieces of each fruit cost?
Note: Use Method 1 from the tutorial to solve this problem.
2. Write a program to solve linear equations:
15x = 5y-8z
9y+3z = x+6
10x+4y-z = 7
Note: Use Method 2 from the tutorial to solve this problem.
SOURCE CODE:
QUESTION 1:
QUESTION 2:
SCREENSHOT:
ASSIGNMENT-5
© Department of Page 17 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
1. Create a cell array of Names, Ages, and Total marks,700091
e.g.,
a) Display the cell array using the MATLAB disp() function. How is the data in the cell array
displayed?
b) Extract the container holding the first name (Aamir) using cell array indexing.
c) Extract the container holding Aamir’s age using cell array indexing.
d) Extract the numeric data for Aamir’s age using cell array indexing.
e) Add records for two more students in the above cell array.
f) Sort studentData in ascending order of Ages.
g) Extract Names column as a single vector.
h) Replace the Total marks for all students from figures to words (e.g. 45 should be replaced with
'Forty five') in studentData.
SOURCE CODE:
disp("question a:")
studentData = {'Aamir', 7, 45;
'Mukesh', 18, 150;
'Anita', 64, 75;
'Raghav', 47, 200;
'Roshni', 36, 0};
disp(studentData)
disp("question b:")
fname=studentData(1,1)
disp("question c:")
fage=studentData(1,2)
disp("question d:")
fagenum=studentData{1,2}
disp("question e:")
studentData(6:7,:)={'sourish',19,70;'pal',28,98};
disp(studentData)
disp("question f:")
s=sortrows(studentData,2);
disp(s)
disp("question g:")
© Department of Page 18 of
CSE 37
Techno
vector=[]; Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
for i=1:7 700091
vector=[vector;studentData(i,1)];
end
disp(vector)
%s=cell2mat(studentData(:,1))
disp("question h:")
studentData(:,3)={'forty five','one hundred fifty','seventy','ninety eight','zero','two hunderd','seventy five'};
disp(studentData)
SCREENSHOT:
© Department of Page 19 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 20 of
CSE 37
Techno
ASSIGNMENT-6
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
1. Write a user-defined function in MATLAB, named printCellArray that takes a 2-D cell array
and displays the data in each container. You may assume that the cell array contains only scalar
data (no array, structure, structure array, cell, or cell array). Hint MATLAB’s size() function
works for cell arrays. For example for the cell array {10 37; 12 8; 2 46} should be displayed as
shown below,
10 37
12 8
2 46
2. Write a MATLAB script-file to read date of birth (dd, mm and yyyy separately) from user and
store in a cell array. The cell array should be arranged as an Nx3 cell array where column one
holds the day(dd), column two holds the month(mm) and column three holds the year(yyyy).
Finally, sort the newly created cell array in ascending order of year and print it on screen. The
output should be as shown in the following example:
20-05-1995
16-08-1997
12-12-2000
06-01-2010
SOURCE CODE:
QUESTION 1:
function printCellArray(c)
row=size(c);
for i=1:row
fprintf('%5d %5d\n',c{i,1},c{i,2});
end
end
QUESTION 2:
SCREENSHOT :
© Department of Page 22 of
CSE 37
Techno
ASSIGNMENT-7
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
1. Write a user defined function named createEmplyee that takes one input argument (N) and one
output argument (an EmployeeData structure array). the function will create a structure array of
EmployeeData consisting of Name, Designation, Age and Salary for N employees. It will also
check for the following validations while taking user input,
2. Using the structure array of EmployeeData, created by the above function, do the following,
a) Display the structure array with all fields for all employees.
b) Display all fields for only the last three employees.
c) Display only two fields, Name and Age for all employees.
d) Compute average age of all employees. [Do without using loop]
e) Count number of employees who gets salary greater than 25000. [Do without using loop]
SOURCE CODE;
© Department of Page 23 of
CSE 37
Techno
printf("Displaying all fields for last three employees:-\n") Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
for i=0:2 700091
disp(employee(n-i))
endfor
SCREENSHOT:
© Department of Page 24 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 25 of
CSE 37
Techno
ASSIGNMENT-8
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
1. Write MATLAB programs for the following:
a) Read in a string and determine if the first character in the string is a capital letter. Test your
program for the following strings: 'Bob Smith', 'lizard', 'Ed', and 'hi Biff'.
b) Modify the previous program so that it will determine if any of the characters in the string are
capital letters. Test your program for the following strings: 'Bob Smith', 'lizard', 'Ed', and 'hi Biff'.
2. Write a user-defined function in MATLAB, with two string input arguments and one vector
output argument to search for the sub-string (second input) within the first input string and will
return the occurrences (starting indices) of the sub string within the first string. In case the sub-
string is missing within the first string 0 (zero) will be returned.
SCORCE CODE:
QUESTION 1:
QUESTION 2:
function c=Assn9b(a,b)
c=0;
cp=1;
for i=1:length(a)
if(a(i)==b(1))
t=1;
j=1;
while (j<=length(b) && j+i-1<=length(a))
if (a(i+j-1)!=b(j))
t=0;
end
j=j+1;
end
if (t==1&&j==length(b)+1)
c(cp)=i;
cp=cp+1;
end
end
end
end
© Department of Page 26 of
CSE 37
Techno
SCREENSHOT: Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 27 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
ASSIGNMENT-9
700091
1) Write the following data into a file named as 'data.txt' and save it in your working directory.
Rainfall Data
M=3
12:00:00
June-2012
09:10:02
July-2012
© Department of Page 28 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
15:03:40
August-2012
SOURCE CODE:-
© Department of Page 29 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
2) Import data from this file and display this data.
700091
>> A=importdata("data.txt")
>> A
© Department of Page 30 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
3) Create a structure named
700091
mydata in the workspace to store data read from the file.
>> %QUESTION 3%
>> mydata=struct;
>> row=5;
>> col=7;
>> fp=fopen("data.txt","rt"); %open in read mode
>> fgets(fp);
>> fgets(fp);
>> line=fgets(fp);
>> M=str2num(line(length(line)-1));%extract number of data
>> for i=1:M %read data into struct
mydata(i).time=fgets(fp);
mydata(i).month=fgets(fp);
mydata(i).rain=fscanf(fp,"%f",[row,col]);
fgets(fp);
end
>> for i=1:M %print data
printf("\nTime: ");
disp(mydata(i).time);
printf("Month: ");
disp(mydata(i).month);
printf("Rain Data: \n");
disp(mydata(i).rain');
end
>> fclose(fp);
© Department of Page 31 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 32 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
4) Extract the data of all the months and export it to separate files named as
'June.txt', 'July.txt', and 'August.txt', respectively.
>> %QUESTION 4%
>> mydata=struct;
>> row=5;
>> col=7;
>> fp=fopen("data.txt","rt"); %open in read mode
>> fgets(fp);
>> fgets(fp);
>> line=fgets(fp);
>> M=str2num(line(length(line)-1));%extract number of data
>> for i=1:M %read data into struct
mydata(i).time=fgets(fp);
mydata(i).month=fgets(fp);
mydata(i).rain=fscanf(fp,"%f",[row,col]);
fgets(fp);
end
>> fclose(fp);
>> for i=1:M
name=strsplit(mydata(i).month,"-");
fname=strcat(name{1},".txt"); %extracting month name and creating
respective file name
fp=fopen(fname,"wt"); %opening that file in write mode
%writing data into respective month files
fprintf(fp,"Time: %s\n",mydata(i).time);
fprintf(fp,"Month: %s\n",mydata(i).month);
data=mydata(i).rain';
dlmwrite(fp,data,"\t");
fclose(fp);
end
>> disp("Done. Respective files have been created");
© Department of Page 33 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 34 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 35 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
ASSIGNMENT-10
1) Create a single 2D plot consisting of 2 subplots. Plot the tan(x) function in one subplot. The
other subplot consists of the function y = e−3.5xsin(10x).
2) Plot a bar chart where the X-axis consists of the months and the Y-axis consists of the number
of days present in that corresponding month.
SOURCE CODE:
QUESTION 1 :
dx = 0.2;
x = (-pi/2)+dx:pi/200:(pi/2)-dx;
y = tan(x);
subplot(1,2,1);
plot(x,y),xlabel('x'),ylabel('tan(x)')
z=exp(-3.5*x).*sin(10*x);
subplot(1,2,2)
plot(x,z),xlabel('x'),ylabel('exp(-3.5x)*sin(10x)')
QUESTION 2 :
month=[1:12];
day=[31,28,31,30,31,30,31,31,30,31,30,31];
bar(month,day),xlabel('Months number ->'),ylabel('No. of Days ->'),axis([0 13 25 32])
title('Year 2021')
SCREENSHOT:
© Department of Page 36 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 37 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
ASSIGNMENT-11
Construct a cylinder with the radius function as 4*cos(t). Create four sub-plots in a 2-by-2 grid
within a figure window such that:
t = 0:pi/10:2*pi;
r= 4*cos(t);
[X,Y,Z] = cylinder(r);
subplot(2,2,1);
plot(X);
title('X coordinates');
subplot(2,2,2);
plot(Y);
title('Y coordinates');
subplot(2,2,3);
plot(Z);
title('Z coordinates');
subplot(2,2,4);
surf(X,Y,Z);
title('Cylinder');
SCREENSHOT:
© Department of Page 38 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 39 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
ASSIGNMENT-12
(1) Perform histogram equalization on an image in MATLAB. Display the image and the
histogram.
SOURCE CODE:
SCREENSHOT :
© Department of Page 40 of
CSE 37
Techno
Main EM-4/1, Sector-V, Salt Lake City, Kolkata-
700091
© Department of Page 41 of
CSE 37