Professional Documents
Culture Documents
What is MATLAB ?
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 1
Elementary MATLAB Operations
arithmetic operations
logical operations
mathematical functions
graphics functions
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 2
The MATLAB User Interface (since Release 2012b)
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 3
Defining Numerical Arrays (MATrices)
rowvector = [ 1 5 − 3 ]
rowvector =
1 5 −3
columnvector = [ 2 ; 4 ; 3 ; − 1 ; 1 − 4 ∗ j ]
columnvector =
2.0000
4.0000
3.0000
−1.0000
1.0000 − 4.0000 i
aMatrix = [ 3 1 + 2 ∗ i 2 ; 4 0 − 5 ]
aMatrix =
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 4
Defining Numerical Arrays (MATrices)
% appending a row v e c t o r ( note : semicolon )
aMatrix = [ aMatrix ; 1 2 3 ]
% appending a row v e c t o r
aMatrix = [ aMatrix ; rowvector ]
% access t o a component
element23 = aMatrix ( 2 , 3 )
% s e t t i n g t o a component
aMatrix ( 2 , 3 ) = 2 5
% c a n c e l l i n g a row v e c t o r
aMatrix ( 1 , : ) = [ ]
% c a n c e l l i n g a column v e c t o r
aMatrix ( : , 2 ) = [ ]
% BUT
aMatrix ( 2 , 3 ) = [ ]
Subscripted assignment dimension mismatch .
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 5
Defining Numerical Arrays (MATrices) - Interactive Access
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 6
MATLABs Memory Stack - The ”Workspace”
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 7
Exercises
1 Within MATLAB define the following matrices and vectors and save them in
corresponding variables:
1 0 0
M=
0 j ,
1
j j+1 −3
1
3
k = 2.75, ~v =
,
−7
−0,5
~ =
w 1 −5.5 −1.7 −1.5 3 −10.7 ,
~y = 1 1.5 2 2.5 ··· 100.5 .
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 8
Exercises
Cancel from matrix V the 2nd row and the 3rd column.
Save the 4th row of matrix V in a new vector r4.
Change component (4, 2) of matrix V to j + 5.
3 Cancel all variables of the workspace and reconstruct matrix V afterwards using
the automatically saved definition commands for V and the ↑- and ↓-keys.
Additionally try to reconstruct other variables using the Command History
Window.
4 Overwrite the 5th row of matrix V with zeros using the Variables Window.
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 9
Arithmetic Operations
M = [1 2 3; 4 −1 2]; % d e f i n e s 2 x3−m a t r i x M
N = [1 2 −1 ; 4 −1 1; 2 0 1] % d e f i n e s 3 x3−m a t r i x N
V =
15 0 4
4 9 −3
K = [1 5 3; 2 −1 −2]; % d e f i n e s a n o t h e r 2 x3−m a t r i x K
W = N+M; % sums N+M, M+N ALLOWED !
lambda = 2 ; % d e f i n e s a s c a l a r v a l u e ( 1 x1−m a t r i x )
V = lambda∗M; % p r o d u c t lambda∗M, M∗lambda ALLOWED !
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 10
Arithmetic Operations
M = [1 2 3; 4 −1 2]; % d e f i n e s 2 x3−m a t r i x M
N = [ 1 2 − 1 ; 4 − 1 1 ; 2 0 1 ] ; % d e f i n e s 3 x3−m a t r i x N
V = M. ∗N % f i e l d p r o d u c t M. ∗N NOT ALLOWED !
Error using . ∗
Matrix dimensions must agree .
K = [1 5 3; 2 −1 −2]; % d e f i n e s a n o t h e r 2 x3−m a t r i x K
V = M. ∗K % f i e l d p r o d u c t s M. ∗ K , K. ∗M ALLOWED !
V =
1 10 9
8 1 −4
k = 3; % d e f i n e s a s c a l a r v a l u e ( 1 x1−m a t r i x )
M. ˆ k ; % f i e l d powers ALLOWED !
W = M. / K % f i e l d d i v i s i o n s ALLOWED !
W=
Starting from
−1 3.5 2
A=
0 1 −1.3
1.1 2 1.9
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 12
Logical Operations
Operations:
and (&)
or (|)
negation (∼)
exclusive Or (xor)
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 13
Logical Operations (Examples)
A= [ 1 − 3 ; 0 0 ] Res=A | B % L o g i c a l OR
A = Res =
1 −3 1 1
0 0 0 1
B= [ 0 5 ; 0 1 ] Res=xor (A, B ) % E x c l u s i v e OR
B = Res =
0 5 1 0
0 1 0 1
Res = Res =
0 1 1 0
0 0 1 0
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 14
Relational Operations
Operations:
equal (==)
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 15
Logical Operations (Examples)
A= [ 1 − 3 ; 0 0 ] Res=A<=B % l e s s o r equal
A = Res =
1 −3 0 1
0 0 1 1
B= [ 0 5 ; 0 1 ] Res=A==B % equal
B = Res =
0 5 0 0
0 1 1 0
Res = Res =
1 0 1 1
0 0 0 1
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 16
Logical and Numerical Indexing
A = vect =
1 −3 −2 3 −4 5 1
0 0
s e l e c t = vect >2 % check elements > 2
a = A( 2 , 1 ) % access t o element ( 2 , 1 )
select =
a =
0 1 0 1 0
0
whos
z = A( 1 : 2 , 1 ) % access t o elements Name Size Bytes Class
% ( 1 , 1 ) and ( 2 , 1 )
select 1x5 5 logical
z = vect 1x5 40 double
1 pick = vect ( s e l e c t ) % s e l e c t by l o g i c a l
0 % indexing
pick =
3 5
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 17
Exercises
s =
mess = [ 2 5 . 5 1 6 . 3 1 8 . 0 ; . . . % c a l l w i t h a m a t r i x
2.0 6.9 3 . 0 ; . . .
0.05 4.9 1 . 1 ] ;
double dBmess [ 3 , 3 ] ;
dBmess=20∗ log10 ( mess ) f o r ( i = 0 ; i < 4; i ++)
{ f o r ( k = 0 ; k < 4; i ++)
dBmess = {
dBmess [ i , k ] = 2 0 ∗ log10 ( mess [ i , k ] ) ;
2 8 . 1 30 8 24.2438 25.1055 }
6.0206 16.7770 9.5424 }
− 26.0206 13.8039 0.8279
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 19
Exercises
8 For a time vector between 0 and 10 with equidistant spacing of 0.1 calculate the
values of the signal (function):
9 For a time vector between 0 and 10 with equidistant spacing of 0.1 calculate the
values of the signal (function):
s(t) = 20 sin(2π5t).
Then round the values first towards ∞ and then towards 0. Find the appropriate
functions using MATLAB’s help mechanisms.
In both cases print the first 6 values of s(t) together with their rounded values in
a two row matrix and then interprete the somehow strange result.
10 Using the appropriate elementary mathematical MATLAB function, calculate
the corresponding vector of binary and decadic logarithms for
~b =
1024 1000 100 2 1 .
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 20
Plotting Signals and Functions with MATLAB
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 21
MATLAB’s x − y-Plot Commands
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 22
The Plot Tools Window
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 23
The colorredsubplot Command
% annotation
x l a b e l ( ’ x−values ’ )
y l a b e l ( ’ modulus of f ( x ) ’ )
subplot ( 2 1 2 ) % s e t t i n g lower p l o t
p l o t ( x , angle ( f ) , ’ r−’ )% p l o t argument
grid % plot a grid
% annotation
x l a b e l ( ’ x−values ’ )
y l a b e l ( ’ phase angle of f ( x ) ’ )
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 24
Exercises
11 Insert the following MATLAB commands to the command window and try to interprete the somehow strange graphical
result:
t =(0:0.5:10);
s i n f k t =sin (2 ∗ p i ∗5∗ t ) ;
cosfkt=2∗cos(2 ∗ p i ∗3∗ t ) ;
expfkt =exp(−2∗ t ) ;
p l o t ( t , [ s i n f k t ; cosfkt ; expfkt ] )
12 Try to experiment with the MATLAB functions semilogx, semilogy and loglog.
For this purpose define a frequency vector
and try to plot modulus and phase angle of the the so called transfer functions
1
H(ω) =
jω
and
1
H(ω) = .
1 + jω
13 Plot the second transfer function above in a superposed way using a logarithmic scale for the frequency and for the
modulus but not for the phase angle (this is called a Bode diagram).
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 25
MATLAB’s I/O-Operations
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 26
Exercises
14 Using your MATLAB editor create a vector and/or a matrix of real numbers an
save it to a text file.
Delete all matrices of the workspace with clear.
Then, using the load command, try to input the contents of the text file into the
workspace and analyze the result.
15 With MATLAB create a column vector of complex numbers. Save this vector in
MATLAB’s binary format using the save command.
The delete the Workspace with clear and then re-input the contents of the saved
file to MATLAB’s workspace using load or the Import Tool!
Compare the result with that of the previous exercise.
16 Search for an appropriate MATLAB function which may be used to insert the
*.wav-file Tada.wav of the companion software to the workspace.
Then display the audio signal graphically. Take care that the time axis is
annotated correctly.
Then multiply the signal by factor 10 and save it in a *.wav-file using a different
file name.
Listen to the audio signals.
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 27
Elementary Matrix Operations
% Determine l a s t component
l a s t = zVec ( end ) ;
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 28
Exercises
into
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 29
MATLAB Script Files
Example:
Features:
% S c r i p t −F i l e funkbsp
%
% Aufruf : funkbsp
- collect MATLAB commands to
%
% A MATLAB−S c r i p t −F i l e example
form a program unit
%
% A u t o r : P r o f . Dr . Ottmar Beucher - are executable in command
% HS K a r l s r u h e − Technik und W i r t s c h a f t
% Version : 1 . 0 1 window with file name as
% Date : 1 4 . 1 1 . 2 0 1 2
command
t =(0:0.01:2);
s i n f k t =sin (2 ∗ p i ∗5∗ t ) ;
cosfkt=2∗cos(2 ∗ p i ∗3∗ t ) ; - may use MATLAB’s help
expfkt =exp(−2∗ t ) ;
p l o t ( t , [ s i n f k t ; cosfkt ; expfkt ] ) mechanism
x l a b e l ( ’ Time / s ’ )
y l a b e l ( ’ Amplitude ’ )
t i t l e ( ’ Three b e a u t i f u l signals ’ )
- produce workspace variables,
act on workspace variables !
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 30
MATLAB Functions
Example:
Features:
function [ t , s i n f k t , cosfkt , expfkt ] = . . .
%
funkbsp2 ( f1 , f2 , damp) - collect MATLAB commands to
% F u n c t i o n funkbsp2 form a program unit capable of
%
% C a l l : see below being parameterized
%
% F i r s t example o f a MATLAB−F u n c t i o n - are executable in Command
t =(0:0.01:2); Window with file name as
s i n f k t =sin (2 ∗ p i ∗ f 1 ∗ t ) ;
cosfkt=2∗cos(2 ∗ p i ∗ f 2 ∗ t ) ;
command and with parameters
expfkt =exp(−damp∗ t ) ;
p l o t ( t , [ s i n f k t ; cosfkt ; expfkt ] ) - may also use MATLAB’s help
x l a b e l ( ’ Time / s ’ )
y l a b e l ( ’ Amplitude ’ ) mechanism
t i t l e ( ’ Three b e a u t i f u l signals ’ )
- clear input/output-parameter
interface
% launch i n command window - act on their own variable stack!
[ t , s i n f k t , cosfkt , expfkt ] = . . .
funkbsp2 ( 2 , 3 , 0 . 1 )
% or simply
funkbsp2 ( 2 , 3 , 0 . 1 )
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 31
MATLAB’s Function Calling Mechanism (Call by Value)
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 32
Exercises
19 Change the code of function funkbsp3 in such way, that you may
externally have access to the contents of componentwise squared
variable a.
20 Change the code of function funkbsp2 in such way, that you may
additionally pass colors and line styles for the graphs of the
signals. The function should then plot the signals in that way.
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 33
MATLAB as a Programming Language
methods % d e f i n e c l a s s methods
end
end
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 34
Exercises
21 Write a MATLAB function that determines for a given vector of numbers the
maximum of its entries using an appropriate loop construct.
The vector should be the only input parameter, the found maximum the only
output parameter.
22 Write a MATLAB function that determines for a given vector of numbers the
positive entries using an appropriate loop construct.
The given vector should be the only input parameter of the MATLAB function.
The result (the positive entries) should be organized in a vector and this vector
should be the output parameter of the MATLAB function.
23 Write a MATLAB function that plots the signal sin(x) between 0 and 2π in a
given color.
The color should be the input parameter of the MATLAB function having the
following strings as allowed values: ’red’, ’blue’, ’green’, ’magenta’. Use a
switch...case construct to determine internally, according to the input parameter
value, which color to use in the plot command.
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 35
Function Handles
Function handles
Features:
- a special kind of pointer:
- a ”pointer” to a
my cos = @cos ; MATLAB function
whos
Name Size Bytes Class
- main usage:
my cos 1x1 16 function handle pass MATLAB
value = cos ( 1 )
functions to other
MATLAB functions via
value =
parameter list!
0.5403
value = my cos ( 1 )
value =
0.5403
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 36
Exercises
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 37
MATLAB’s ODE Solvers
Example:
Mathematical model:
initial value problem of second order:
g
α̈(t) = − · sin(α(t)), α(0), α̇(0).
l
or equivalently:
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 39
The ODE-file Structure
Structure of an ODE-File
Features:
(example):
- represents the system of 1st
function [ alphadot ] = pendgl ( t , alpha )
% order ODEs
% F u n c t i o n pendgl
% - has a fixed parameter
% C a l l : o n l y c a l l e d by ODE−s o l v e r s
% interface
% Example o f an ODE−f i l e f o r use w i t h
% ode23 , ode45 a . s . o . - does’nt make sense as a
%
function of it’s own! Is
l =10; % l e n g t h o f pendulum
g=9.81; % gravit . acceleration called only by MATLAB’s
%% I n i t i a l i z a t i o n
solvers
alphadot = [ 0 ; 0 ] ; - has to be passed to
%% R e p r e s e n t a t i o n o f t h e f i r s t o r d e r ODEs
MATLAB’s solvers by a
function handle
% f i r s t equation
alphadot ( 1 ) = alpha ( 2 ) ;
% second e q u a t i o n
alphadot ( 2 ) = − ( g / l ) ∗ sin ( alpha ( 1 ) ) ;
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 40
How Solvers Use ODE-file’s Information
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 41
Resistor-Capacitor Lowpass
d 1 1
u(t) = − u(t) + u1 (t), u(0) = u0 .
dt RC RC
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 42
Exercises
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 44
Symbolic Calculus Example
syms x y v
whos
Name Size Bytes Class Attributes
v 1x1 60 sym
x 1x1 60 sym
y 1x1 60 sym
f =
dfy =
2∗x∗y∗cos ( x∗y ˆ2) ∗ cos ( v∗x∗y)−v∗x∗ sin ( x∗y ˆ2) ∗ sin ( v∗x∗y )
dfv =
2
sin ( x y ) cos ( v x y )
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 45
Export Symbolic to Numeric
dt = 0 . 1 ; % d e f i n e sampling s t e p s i z e
t = ( 0 : dt : 1 0 ) ; % d e f i n e sampling p o i n t s
fnum = t . ˆ 2 . ∗ cos ( t ) ; % calculate function numerically
% p l o t numerical d e r i v a t i v e
p l o t ( ( dt : dt : 1 0 ) , dfnum , ’ b−−’ )
hold
dfnum2 = subs ( df , x , t ) ; % convert symbolic s o l u t i o n to
% a numerical s o l u t i o n with the
p l o t ( t , dfnum2 , ’ r ’ ) % subs−command and p l o t i t
grid
xlabel ( ’x ’ )
ylabel ( ’ derivative ’ )
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 46
Exercises
g(x) = sin(5x − 2)
ẏ = xy2 .
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 47
Dynamical Systems - a Known Example
Zt
1
y(t) = i(τ ) dτ,
C
0
1
y(t) = x(t) − i(t) · R ⇐⇒ i(t) = (x(t) − y(t) .
R
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 48
The Simulink Idea
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 49
Constructing a Simulink Model - The Library Browser
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 50
Constructing a Simulink Model - The Model Window
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 51
Simulating a Simulink Model - The Parameter Panel
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 52
Exercises
34 Check the test system sl test1.slx for different step sizes using a
solver with internal step size control (variable step solvers).
Compare different calculation times when using a step size of
0.00001 directly with the fixed step solver ode3 on one hand and
when using the variable step solvers ode23 on the other hand.
Three Examples:
1
T · ẏ(t) + ·y(t) = x(t), T :=
RC
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 54
Exercises
Compare the numerical Simulink solution with an exact one which you
may calculate by hand or using the Symbolic Math Toolbox.
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 55
Simulink System Simplification Methods
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 56
Simulink System Simplification Methods
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 57
Exercises
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 58
Interaction with MATLAB - an Overview
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 59
Interaction with MATLAB - the Config Parameters Panel
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 60
Exercises
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 61
Interaction with MATLAB - Data Exchange with Functions
% Example : g e t i n i t i a l c o n d i t i o n parameter o f t h e i n t e g r a t o r
% b l o c k i n system s l P e n d e l
45 Revisit the Simulink system of the previous exercise (42) and alter
the parameters via set param before starting it.
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 63
Interaction with MATLAB - the sim Command
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 64
The sim Command - the Config Parameters Panel
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 65
The sim Command - Automize Simulink Simulations
open ( ’ sl Pendel2 . s l x ’ ) ;
% S i m u l a t e S i m u l i n k system w i t h sim
% make sure t h a t sim r e t u r n s a S i m u l i n k . S i m u l a t i o n O u t p u t o b j e c t
% by s e t t i n g t h e parameter ’ SaveOutput ’ t o ’ on ’
% ( i f sim i s lauched o n l y w i t h t h e S i m u l i n k system name
% o n l y t h e t i m e v e c t o r w i l l be r e t u r n e d )
% Access t h e r e s u l t s w i t h t h e g e t method
% and save them i n t o t h e o u t p u t v a r i a b l e s
% o f f u n c t i o n simPendel2
z e i t = simOut . get ( ’ t ’ ) ;
simuerg = simOut . get ( ’ yout ’ ) ;
Note: the system sl Pendel2 may be launched several times this way,
using a for loop and saving the results in matrices or cell arrays!!
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 66
Exercises
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 68
Look Up Tables - An Example
Prof. Dr. Ottmar Beucher MATLAB and Simulink - Summer School NCHU, Taichung July 2013 69
Exercises
Design a Simulink system that realizes this characteristic with a 1-D Lookup
Table. Input a sine wave signal to the Lookup Table and analyze its output
signal. Experiment with different amplitudes of the sine wave.