Professional Documents
Culture Documents
John Sebeson
DeVry University
What is MATLAB?
MATLAB stands for MATrix LABoratory.
MATLAB is a high-performance language for
technical computing.
Math and computation
Algorithm development (optimized for DSP)
Data acquisition
Modeling, simulation, and prototyping
Data analysis, exploration, and visualization
Scientific and engineering graphics
Application development, including graphical
user interface building
Develop and
SIMULINK
Test Algorithms
Simulation
in MATLAB
Code DSP
Composer Processor
Platform
exp - Exponential.
expm1 - Compute exp(x)-1 accurately.
log - Natural logarithm.
log1p - Compute log(1+x) accurately.
log10 - Common (base 10) logarithm.
log2 - Base 2 logarithm and dissect floating point number.
pow2 - Base 2 power and scale floating point number.
realpow - Power that will error out on complex result.
reallog - Natural logarithm of real number.
realsqrt - Square root of number greater than or equal to zero.
sqrt - Square root.
nthroot - Real n-th root of real numbers.
nextpow2 - Next higher power of 2.
3000
3000 K
2500
kilowatts/sq.meter-micron
2700 K
2500 K
2000
1500
1000
500
0
0 1 2 3 4 5 6 7 8 9 10
wavelength microns
>> deconv(pc,p2)
ans =
1 3 2
>> deconv(pc,p1)
ans =
1 5 4 4
>> A=[5,-2,-3;0,4,3;1,-1,9];
>> B=[-3,-2,60]'; % Note vector transpose (‘)
>> S=linsolve(A,B)
S=
1.0000
-5.0000
6.0000
y 12 x 2 x 8
MATLAB code:
>> roots([12 -1 -8])
ans =
0.8592
-0.7759
-7I1 + 6I2 = 5
6I1 – 8I2 = -10
>> A=[-7,6;6,-8];
>> B=[5;-10];
>> X=linsolve(A,B)
A*X = B ans =
1.0000
2.0000
VGS
ID
RS
2
VGS
I D I DSS 1
VP
0.008
Drain Current, Id
0.006
0.004
0.002
0
-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
Gate-Source Voltage, Vgs
gx 2
y x tan( 0 ) 2
2v0 cos 2 ( 0 )
>> v0=25;
>> x=50;
>> g=9.8;
>> y=3.44;
>> theta=5:.1:70;
>> theta_r=theta*pi/180;
>> z=y*ones(1,length(theta));
>> zz=x*tan(theta_r)-g*x^2./(2*v0^2*(cos(theta_r)).^2);
>> plot(theta,zz)
>> hold
Current plot held
>> plot(theta,z)
2 sin( n2ft )
ssquare(t )
n 1 n
n 1,3,5,...
Finite Impulse Response (FIR) Filter Design
0
h[n] SINC (0 n)
Use of “fvtool”