Professional Documents
Culture Documents
-1
OBJECTIVE: Introduction to MATLAB and to study the
control system toolbox in MATLAB.
Printer
Paper
Specifications
Any
2012 or higher
version
Any
A4 size sheets
PROGRAM:
close all;
clear all;
x=-pi:0.01:pi;
subplot(2,2,1);
plot(x,sin(x),'r','LineWidth',5)
xlabel('time');
ylabel('sin(x)');
title('sin(x) graph');
grid on;
subplot(2,2,2);
plot(x,cos(x),'g','LineWidth',5)
xlabel('time');
ylabel('cos(x)');
title('cos(x) graph');
grid on;
subplot(2,2,3);
plot(x,tan(x),'b','LineWidth',5)
xlabel('time');
ylabel('tan(x)');
title('tan(x) graph');
grid on;
subplot(2,2,4);
plot(x,cot(x),'y','LineWidth',5)
xlabel('time');
ylabel('cot(x)');
title('cot(x) graph');
grid on;
RESULT:
PRECAUTIONS:
1. Write syntax of code carefully.
2. Define line-width, colour of the curves and title of
each curve.
KEY FEATURES: