The name MATLAB stands for MATrix LABoratory.MATLAB is a high-performance language for technical computing.
It integrates computation, visualization, and programming environment. Furthermore, MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-in editing and debugging tools, and supports object-oriented programming.
These factor make MATLAB an excellent tool for teaching and research.
4. Contents
1. Introduction
2. Basic Plotting
3. Matrices In MATLAB
4. M-File Programming
5. Control Systems
6. Digital Signal Processing
7. Modelling and control of DC Motor
8. Modelling and simulation of DC-DC converter (Buck Converter)
9. Simulation of DC-AC Converter(Voltage Source inverter)
10. Mathematical Modelling Using SimScape(Electrical Systems)
11. Laplace and Inverse Laplace Transformations using MATLAB
12. Fourier and Inverse Fourier Transformations Using MATLAB
13. Digital electronics Circuits
14. Filters using various Windows
15. Step Responses of P,I,D,PI,PD,PID Controllers
4Mohd Esa
5. 1.Introduction
⢠The name MATLAB stands for MATrix
LABoratory.MATLAB is a high-performance language
for technical computing.
⢠It integrates computation, visualization, and
programming environment. Furthermore, MATLAB is
a modern programming language environment: it has
sophisticated data structures, contains built-in
editing and debugging tools, and supports object-
oriented programming.
⢠These factor make MATLAB an excellent tool for
teaching and research.
5Mohd Esa
6. Starting MATLAB
When you start MATLAB, a special window called the
MATLAB desktop appears. The desktop is a window
that contains other windows. The major tools within or
accessible from the desktop are:
⢠The Command Window
⢠The Command History
⢠The Workspace
⢠The Current Directory
⢠The Help Browser
⢠The Start button
6Mohd Esa
8. Using MATLAB as a calculator
⢠As an example of a simple interactive calculation, just type the expression
you want to evaluate. Letâs start at the very beginning. For example, letâs
suppose you want to calculate the expression, 1 + 2 Ă 3. You type it at the
prompt command (>>) as follows,
>> 1+2*3
ans =7
⢠You will have noticed that if you do not specify an output variable,
MATLAB uses a default variable ans, short for answer, to store the results
of the current calculation. Note that the variable ans is created (or
overwritten, if it is already existed). To avoid this, you may assign a value
to a variable or output argument name. For example,
>> x = 1+2*3
x =7
⢠will result in x being given the value 1 + 2 à 3 = 7. This variable name can
always be used to refer to the results of the previous computations.
Therefore, computing 4x will result in
>> 4*x
ans = 28.0000
8Mohd Esa
10. Example
The value of the expression y = đâđ
sin(x) + 10ây, for a = 5, x = 2, and y = 8 is computed
by
>> a = 5; x = 2; y = 8;
>> y = exp(-a)*sin(x)+10*sqrt(y)
y =28.2904
The subsequent examples are
>> log(142)
ans = 4.9558
>> log10(142)
ans = 2.1523
Note the difference between the natural logarithm log(x) and the decimal logarithm
(base 10) log10(x).
To calculate sin(Ď/4) and đ10
, we enter the following commands in MATLAB,
>> sin(pi/4)
ans = 0.7071
>> exp(10)
ans =2.2026e+004
10Mohd Esa
11. Quitting MATLAB
⢠To end your MATLAB session, type quit in the
Command Window,
(or)
select File ââ Exit
MATLAB in the desktop main menu.
11Mohd Esa
12. 2.Basic plotting
⢠MATLAB has an excellent set of graphic tools. Plotting a
given data set or the results of computation is possible
with very few commands. You are highly encouraged to
plot mathematical functions and results of analysis as
often as possible.
⢠Trying to understand mathematical equations with
graphics is an enjoyable and very efficient way of
learning mathematics.
⢠Being able to plot mathematical functions and data
freely is the most important step, and this section is
written to assist you to do just that.
12Mohd Esa
13. Plotting Example-1
The MATLAB command to plot a graph is plot (x,y). The vectors x = (1, 2, 3, 4, 5, 6) and y = (3, â1,
2, 4, 5, 1) produce the picture shown
>> x = [1 2 3 4 5 6];
>> y = [3 -1 2 4 5 1];
>> plot(x,y)
13Mohd Esa
14. Plotting Example-2
⢠For example, to plot the function sin (x) on the
interval *0, 2Ď+, we first create a vector of x values
ranging from 0 to 2Ď, then compute the sine of these
values, and finally plot the result
>> x = 0:pi/100:2*pi;
>> y = sin(x);
>> plot(x , y)
â starts at 0,
â takes steps (or increments) of Ď/100,
â stops when 2Ď is reached.
14Mohd Esa
15. Adding titles, axis labels, and
annotations
>> xlabel(âx = 0:2piâ)
>> ylabel(âSine of xâ)
>> title(âPlot of the Sine functionâ)
15Mohd Esa
16. Multiple data sets in one plot
⢠Multiple (x, y) pairs arguments create multiple graphs with a single call to plot. For
example, these statements plot three related functions of x: y1 = 2 cos(x), y2 =
cos(x), and y3 = 0.5 â cos(x), in the interval 0 ⤠x ⤠2Ď.
>> x = 0:pi/100:2*pi;
>> y1 = 2*cos(x);
>> y2 = cos(x);
>> y3 = 0.5*cos(x);
>> plot(x,y1,â--â,x,y2,â-â,x,y3,â:â)
>> xlabel(â0 leq x leq 2piâ)
>> ylabel(âCosine functionsâ)
>> legend(â2*cos(x)â,âcos(x)â,â0.5*cos(x)â)
>> title(âTypical example of multiple plotsâ)
>> axis([0 2*pi -3 3])
16Mohd Esa
18. Specifying line styles and colors
⢠It is possible to specify line styles, colors, and markers (e.g., circles, plus signs, . . . )
using the plot command:
plot(x,y,âstyle_color_markerâ)
where style_color_marker is a triplet of values from below table
18Mohd Esa
19. 3.Matrices in Matlab
⢠The purpose of this section is to show how to
create vectors and matrices in MATLAB.An
array of dimension 1 Ăn is called a row vector,
whereas an array of dimension m Ă 1 is called
a column vector. The elements of vectors in
MATLAB are enclosed by square brackets and
are separated by spaces or by commas.
19Mohd Esa
20. Row & Column Vector
To enter a row vector, v, type
>> v = [1 4 7 10 13]
v = 1 4 7 10 13
Column vectors are created in a similar way, however, semicolon
(;) must separate the components of a column vector,
>> w = [1;4;7;10;13]
w =
1
4
7
10
13 20Mohd Esa
21. Converting Row Vector into Column
Vector
⢠A row vector is converted to a column vector using the
transpose operator. The transpose operation is
denoted by an apostrophe or a single quote (â).
⢠>> w = vâ
w =
1
4
7
10
13
21Mohd Esa
22. Entering a matrix
⢠A matrix is an array of numbers. To type a
matrix into MATLAB you must
⢠begin with a square bracket, [
⢠separate elements in a row with spaces or
commas (,)
⢠use a semicolon (;) to separate rows
⢠end the matrix with another square bracket, ]
22Mohd Esa
23. Example
⢠Here is a typical example. To enter a matrix A,
such as,
>> A = [1 2 3; 4 5 6; 7 8 9]
⢠MATLAB then displays the 3 à 3 matrix as follows,
A =
1 2 3
4 5 6
7 8 9
23Mohd Esa
24. Correction Through Indexing
⢠Correcting any entry is easy through indexing.
Here we substitute A(3,3)=9 by
A(3,3)=0. The result is
>> A(3,3) = 0
A =
1 2 3
4 5 6
7 8 0
24Mohd Esa
25. Determining Dimensions of a Matrix
⢠To determine the dimensions of a matrix or
vector, use the command size. For example,
⢠>> size(A)
ans =
3 3
means 3 rows and 3 columns
25Mohd Esa
26. Transposing a matrix
⢠The transpose operation is denoted by an
apostrophe or a single quote (â). It flips a matrix
⢠about its main diagonal and it turns a row vector
into a column vector. Thus,
>> Aâ
ans =
1 4 7
2 5 8
3 6 0
26Mohd Esa
27. Matrix Athematic
>> C = A.*B
C =
10 40 90
160 250 360
490 640 810
>> A.^2
ans =
1 4 9
16 25 36
49 64 81
27Mohd Esa
28. Matrix inverse
⢠>> A = [1 2 3; 4 5 6; 7 8 0];
>> inv(A)
ans =
-1.7778 0.8889 -0.1111
1.5556 -0.7778 0.2222
-0.1111 0.2222 -0.1111
>> det(A)
ans =
27
28Mohd Esa
30. 4.M-Files in MATLAB
⢠A script file is an external file that contains a
sequence of MATLAB statements. Script files
have a filename extension .m and are often
called M-files. M-files can be scripts that
simply execute a series of MATLAB
statements, or they can be functions that can
accept arguments and can produce one or
more outputs.
30Mohd Esa
31. Example-1 of M-File
⢠Use the MATLAB editor to create a file: File â
New â M-file.
A = [1 2 3; 3 3 4; 2 3 3];
b = [1; 1; 2];
x = Ab
Save the file, for example, example1.m.
⢠Run the file, in the command line, by typing:
>> example1
x =
-0.5000
1.5000
-0.5000
31Mohd Esa
32. Example-2 of M-File(Same example previously
executed in command window)
Plot the following cosine functions, y1 = 2 cos(x), y2 = cos(x), and y3 = 0.5 â
cos(x), in the interval 0 ⤠x ⤠2Ď.
⢠Create a file, say example2.m, which contains the following commands
x = 0:pi/100:2*pi;
y1 = 2*cos(x);
y2 = cos(x);
y3 = 0.5*cos(x);
plot(x,y1,â--â,x,y2,â-â,x,y3,â:â)
xlabel(â0 leq x leq 2piâ)
ylabel(âCosine functionsâ)
legend(â2*cos(x)â,âcos(x)â,â0.5*cos(x)â)
title(âTypical example of multiple plotsâ)
axis([0 2*pi -3 3])
Run the file by typing example2 in the Command Window.
32Mohd Esa
33. Program to compute area of circle
To print results in a MATLAB function we use the the fprintf
statement. The syntax is very similar to the corresponding C
command. The function input allows the user to provide input
data from the keyboard. A simple example is below.
Function area circle
% interactive program to compute area of circle
r = input(âGive radius of circle : â);
a = pi*rË2;
fprintf(âThe area of circle with radius %.2f is %.6f nâ, r, a);
33Mohd Esa
34. 5.Control Systems
TRANSFER FUNCTION FROM ZEROS AND POLES
MATLAB PROGRAM:
z=input(âenter zeroesâ)
p=input(âenter polesâ)
k=input(âenter gainâ)
[num,den]=zp2tf(z,p,k)
tf(num,den)
EXAMPLE:
Given poles are -3.2+j7.8,-3.2-j7.8,-4.1+j5.9,-4.1-j5.9,-8 and the zeroes are -
0.8+j0.43,-0.8-j0.43,-0.6 with a gain of 0.5
34Mohd Esa
35. ZEROS AND POLES FROM TRANSFER
FUNCTION
MATLAB PROGRAM:
num = input(âenter the numerator of the transfer functionâ)
den = input(âenter the denominator of the transfer functionâ)
[z,p,k] = tf2zp(num,den)
EXAMPLE:
35Mohd Esa
36. STEP RESPONSE OF A TRANSFER
FUNCTION
num = input(âenter the numerator of the transfer functionâ)
den = input(âenter the denominator of the transfer functionâ)
step(num,den)
36Mohd Esa
37. IMPULSE RESPONSE OF A TRANSFER
FUNCTION
num = input(âenter the numerator of the transfer functionâ)
den = input(âenter the denominator of the transfer functionâ)
impulse(num,den)
37Mohd Esa
38. ROOT LOCUS FROM A TRANSFER FUNCTION
PROGRAM:
num=input(âenter the numerator of the transfer functionâ)
den=input(âenter the denominator of the transfer functionâ)
h=tf(num,den)
rlocus(h)
38Mohd Esa
39. BODE PLOT FROM A TRANSFER FUNCTION
PROGRAM:
num=input('enter the numerator of the transfer function')
den=input('enter the denominator of the transfer function')
h=tf(num,den)
[gm pm wcp wcg]=margin(h)
bode(h)
39Mohd Esa
40. TRANSFER FUNCTION FROM STATE MODEL
MATLAB PROGRAM:
A =input(âenter the matrix Aâ)
B= input(âenter the matrix Bâ)
C = input(âenter the matrix Câ)
D= input(âenter the matrix Dâ)
Sys =ss2tf(A,B,C,D)
40Mohd Esa
41. STATE MODEL FROM TRANSFER FUNCTION
There are three methods for obtaining state model from transfer function:
1. Phase variable method
2. Physical variable method
3. Canonical variable method
Out of three methods given above canonical form is probably the most
straightforward method
for converting from the transfer function of a system to a state space model is to
generate a
model in "controllable canonical form.â
PROGRAM:
num=input(âenter the numerator of the transfer functionâ)
den=input(âenter the denominator of the transfer functionâ)
ss(tf(num,den))
41Mohd Esa
42. STATE MODEL FROM ZEROS AND POLES
PROGRAM:
z=input('enter zeros')
p=input('enter poles')
k=input('enter gain')
[A,B,C,D]=zp2ss(z,p,k)
42Mohd Esa
43. STEP RESPONSE OF A STATE MODEL
PROGRAM:
A=input(âenter matrix Aâ)
B=input(âenter matrix Bâ)
C=input(âenter matrix Câ)
D=input(âenter matrix Dâ)
Step(A,B,C,D)
43Mohd Esa
44. IMPULSE REPONSE OF A STATE MODEL
PROGRAM:
A=input('enter matrix A')
B=input('enter matrix B')
C=input('enter matrix C')
D=input('enter matrix D')
impulse(A,B,C,D)
44Mohd Esa
45. RAMP RESPONSE OF A STATE MODEL
PROGRAM:
t=0:0.01:10;
u=t
A=input('enter matrix A')
B=input('enter matrix B')
C=input('enter matrix C')
D=input('enter matrix D')
lsim(A,B,C,D,u,t)
45Mohd Esa
46. NYQUIST PLOT FROM TRANSFER
FUNCTION
PROGRAM:
num=input(âenter the numerator of the transfer functionâ)
den=input(âenter the denominator of the transfer functionâ)
h=tf(num,den)
nyquist(h)
[gm pm wcp wcg]=margin(h)
if(wcp>wcg)
disp(âsystem is stableâ)
else
disp(âsystem is unstableâ)
end
46Mohd Esa
52. Superposition Theorem Program
clc;
E1=input('enter the source voltage 1:');
E2=input('enter the source voltage 2:');
disp('first step:');
r1=input('enter resistance 1:');
r2=input('enter resistance 2:');
r3=input('enter resistance 3:');
disp('total resistance in first step is');
rftotal=(r1+((r2*r3)/(r2+r3)));
disp(rftotal)
disp('current through resistance R1:');
if1=E1/rftotal;
disp(if1)
disp('current through resistance R2:');
if2=(if1*(r3/(r3+r2)));
disp(if2)
disp('current through resistance R3:');
if3=(if1*(r2/(r3+r2)));
disp(if3)
disp('second step:');
disp('total resistance in second step is');
rstotal=(r2+((r3*r1)/(r1+r3)));
disp(rstotal)
disp('current through resistance R2:');
is2=E2/rstotal;
disp(is2)
disp('current through resistance R1:');
is1=(is2*(r3/(r3+r1)));
disp(is1)
disp('current through resistance R3:');
is3=(is2*(r1/(r1+r3)));
disp(is3)
disp('The total currents in different branches are:');
disp('current through resistance R1:');
i1=if1-is1;
disp(i1)
disp('current through resistance R2:');
i2=is2-if2;
disp(i2)
disp('current through resistance R3:');
i3=if3+is3;
disp(i3)
52Mohd Esa
53. Program Result
enter the source voltage 1:20
enter the source voltage 2:28
first step:
enter resistance 1:8
enter resistance 2:10
enter resistance 3:12
total resistance in first step is
13.4545
current through resistance R1:
1.4865
current through resistance R2:
0.8108
current through resistance R3:
0.6757
second step:
total resistance in second step is
14.8000
current through resistance R2:
1.8919
current through resistance R1:
1.1351
current through resistance R3:
0.7568
The total currents in different branches are:
current through resistance R1:
0.3514
current through resistance R2:
1.0811
current through resistance R3:
1.4324
53Mohd Esa
56. Thevenins Theorem Program
E1=input('enter the source voltage:');
r1=input('enter resistance r1:');
r2=input('enter resistance r2:');
rload=input('enter the load
resistance:');
r=input('enter resistance of voltage
source:');
disp('Equivalent emf of the
network:');
disp('current in the network before
load resistance is connected');
i=(E1/(r1+r2+r));
disp(i)
disp('voltage across terminals LM:');
Eth=i*r2;
disp(Eth)
disp('Equivalent resistance of the
network:');
rth=((r2*(r1+r))/(r2+(r1+r)));
disp(rth)
disp('current in load resistance:');
il=(Eth/(rth+rload));
disp(il)
56Mohd Esa
88. 10.Mathematical Modelling Using SimScape
(Electrical Systems)
Simscape provides an environment for modeling
and simulating physical systems spanning
mechanical, electrical, hydraulic, and other
physical domains. It provides fundamental
building blocks from these domains that you can
assemble into models of physical components,
such as electric motors,inverting op-amps,
hydraulic valves, and ratchet mechanisms.
88Mohd Esa
89. Features of SimScape
⢠Single environment for modeling and simulating mechanical,
electrical, hydraulic, thermal, and other multidomain physical
systems
⢠Libraries of physical modeling blocks and mathematical elements
for developing custom components
⢠MATLAB based Simscape language, enabling text-based authoring
of physical modeling components, domains, and libraries
⢠Physical units for parameters and variables, with all unit conversions
handled automatically
⢠Ability to simulate models that include blocks from related physical
modeling products without purchasing those products
⢠Support for C-code generation
89Mohd Esa
90. SimScape Libraries
Simscape block library contains two libraries that belong to
the Simscape⢠product:
⢠Foundation library â Contains basic hydraulic, pneumatic,
mechanical, electrical, magnetic, thermal, thermal liquid,
and physical signal blocks, organized into sublibraries
according to technical discipline and function performed
⢠Utilities library â Contains essential environment blocks for
creating Physical Networks models
⢠In addition, if you have installed any of the add-on products
of the Physical Modeling family, you will see the
corresponding libraries under the main Simscape library.
90Mohd Esa
91. Foundation Libraries
⢠Simscape Foundation libraries contain a
comprehensive set of basic elements and building
blocks, such as:
⢠Mechanical building blocks for representing one-
dimensional translational and rotational motion
⢠Electrical building blocks for representing
electrical components and circuits
⢠Magnetic building blocks that represent
electromagnetic components
91Mohd Esa
92. ⢠Hydraulic building blocks that model fundamental hydraulic effects
and can be combined to create more complex hydraulic
components
⢠Pneumatic building blocks that model fundamental pneumatic
effects based on the ideal gas law
⢠Thermal building blocks that model fundamental thermal effects
⢠Thermal liquid building blocks that model fundamental
thermodynamic effects in liquids
⢠Physical Signals block library that lets you perform math operations
on physical signals, and graphically enter equations inside the
physical network
⢠Using the elements contained in these Foundation libraries, you can
create more complex components that span different physical
domains. You can then group this assembly of blocks into a
subsystem and parameterize it to reuse and share these
components.
92Mohd Esa
93. Utilities Library
⢠In addition to Foundation libraries, there is also a Simscape
Utilities library, which contains utility blocks, such as:
⢠Solver Configuration block, which contains parameters
relevant to numerical algorithms for Simscape simulations.
Each Simscape diagram (or each topologically distinct
physical network in a diagram) must contain a Solver
Configuration block.
⢠Simulink-PS Converter block and PS-Simulink Converter
block, to connect Simscape and SimulinkÂŽ blocks. Use the
Simulink-PS Converter block to connect Simulink outports
to Physical Signal inports. Use the PS-Simulink Converter
block to connect Physical Signal outports to Simulink
inports.
93Mohd Esa
96. Electrical System Using SimScape
⢠In this example, you are going to model an electrical system and makes you
familiar with using the basic SimScape blocks.
96Mohd Esa
99. 11.Laplace and Inverse Laplace
Transformations using MATLAB
Laplace Transforms: In this example, we will compute the
Laplace transform of some commonly used functions.
99
Program Result
syms s t a b w
laplace(a)
laplace(t^2)
laplace(t^9)
laplace(exp(-b*t))
laplace(sin(w*t))
laplace(cos(w*t))
ans =
1/s^2
ans =
2/s^3
ans =
362880/s^10
ans =
1/(b + s)
ans =
w/(s^2 + w^2)
ans =
s/(s^2 + w^2)
Mohd Esa
100. Inverse Laplace Transform
MATLAB allows us to compute the inverse Laplace transform using the command
ilaplace.
Program Result
syms s t a b w
ilaplace(1/s^7)
ilaplace(2/(w+s))
ilaplace(s/(s^2+4))
ilaplace(w/(s^2 + w^2))
ilaplace(s/(s^2 + w^2))
ans =
t^6/720
ans =
2*exp(-t*w)
ans =
cos(2*t)
ans =
sin(t*w)
ans =
cos(t*w)
100Mohd Esa
101. 12.Fourier and Inverse Fourier
transformations Using MATLAB
Program For Fourier Transformation
syms x
f = exp(-2*x^2); %our function
ezplot(f,[-2,2]) % plot of our function
FT = fourier(f) % Fourier transform
The following result is displayed â
FT =
(2^(1/2)*pi^(1/2)*exp(-w^2/8))/2
Plotting the Fourier transform as â
ezplot(FT)
101Mohd Esa
102. Inverse Fourier Transform
MATLAB provides the ifourier command for
computing the inverse Fourier transform of a
function. For example
102Mohd Esa
111. 14-Filters using Various windows
⢠Filters
Low pass filters
High pass filters
Band pass filters
Band stop filters
⢠Windows
Rectangular
Hamming
Hanning
Blackman
111Mohd Esa
112. Low Pass Filter
Low pass filter Program:
clc;
clear all;
N=50;
wc=0.5*pi;
b=fir1(N,(wc/pi),rectwin(N+1));
w=0:.001:pi;
H=freqz(b,1,w);
plot(w,abs(H))
%replace rectwin with hamming/hanning/Blackman windows
112Mohd Esa
117. High Pass Filter
clc;
clear all;
N=50;
wc=0.5*pi;
b=fir1(N,(wc/pi),'high',rectwin(N+1));
w=0:.001:pi;
H=freqz(b,1,w);
plot(w,abs(H))
%replace rectwin with hamming/hanning/Blackman windows
117Mohd Esa
132. Step Responses of P,I,D,PI,PD,PID
Controllers
P Controller (kp=1)
clc
clear all
close all
kp=input('enter the value of kp');
num=[1+kp];
den=[1,20,10+kp];
h=tf(num,den);
step(h)
figure
g=feedback(h,1);
step(g)
figure
step(h,g)
figure
nyquist(g)
figure
bode(g)
132Mohd Esa
134. I Controller(ki=1)
clc
clear all
close all
ki=input('enter the value of ki');
num=[1+ki];
den=[1,20,10,ki];
h=tf(num,den);
step(h)
figure
g=feedback(h,1);
step(g)
figure
step(h,g)
figure
nyquist(g)
figure
bode(g) 134Mohd Esa
136. D Controller(kd=1)
clc
clear all
close all
kd=input('enter the value of kd');
num=1;
den=[1,(20+kd),10];
h=tf(num,den);
step(h)
figure
g=feedback(h,1);
step(g)
figure
step(h,g)
figure
nyquist(g)
figure
bode(g) 136Mohd Esa
138. PD Controller (kp=1;kd=2)
clc
clear all
close all
kd=input('enter the value of kd');
kp=input('enter the value of kp');
num=1+kp;
den=[1,20+kd,10+kp];
h=tf(num,den);
step(h)
figure
g=feedback(h,1);
step(g)
figure
step(h,g)
figure
nyquist(g)
figure
bode(g)
138Mohd Esa
140. PI Controller(kp=1,ki=2)
clc
clear all
close all
kp=input('enter the value of kp');
ki=input('enter the value of ki');
num=[kp,ki];
den=[1,20,10+kp,ki];
h=tf(num,den);
step(h)
figure
g=feedback(h,1);
step(g)
figure
step(h,g)
figure
nyquist(g)
figure
bode(g)
140Mohd Esa
142. PID Controller (kp=1;ki=2;kd=3)
clc
clear all
close all
kp=input('enter the value of kp');
ki=input('enter the value of ki');
kd=input('enter the value of kd');
num=[1+ki];
den=[1+kd,20+kp,10+ki];
h=tf(num,den);
step(h)
figure
g=feedback(h,1);
step(g)
figure
step(h,g)
figure
nyquist(g)
figure
bode(g)
142Mohd Esa