Professional Documents
Culture Documents
Matlab (Koli)
Matlab (Koli)
MATLAB
MATLAB
MATLAB
56 *5 $ 5 MATLAB 5 ' ,: : !97 , P; . $ '% L U#3 % J ( MATLAB J 6
CCustom Installation IY@ CMATLAB P; + : % * $%#( ,( # X 6 W - 8 * : VA
< #5 A 5" ) ' ,( * ( % 3 CMATLAB P; + : % D $ 6Y@ %#2 . % # : !97
6 7 ' ( H <= ' ,: 6 crack C original >S @ ,( MATLAB Z [$ PLP
$ 6 MATLAB P; + : % %#( 3# <= \ # 6 PLP
] #( % MATLAB \ " Start # E 4 . CMATLAB P; . /
Matlab
MATLAB !"
5-$ 5 :5 i#5 . MATLAB 5: d , $ ' ( - 4 6 6 . MATLAB
MATLAB _5 # , * l%#( ? 9 jkj #S 6 + %#2 < % % A 6 d
$ #( 7
7 d # . Fm : % ? 9 . <= : d 6 * MATLAB !a : ! 7 . D
5 C 5+ % < 5 5 $%#5( p#A )#4 % # : d '. 9o 6 <= MATLAB + % P3 7 In $ 6 ? 9
5 . < 5 \52 5I ) 5a < # A $ d J 1 9 :'% R % %#( q@L <= 9o d . '% R * 3
] 6
a = [1 2]
5 5 5 a d 9o C%#( '% R a = 5 # %. % % Z [ $ '% 6 ? 9 a jkr d
$% 6 : #2 d jkj
] 6 + 0= % = >9 m 9o ' ( ? 9 : d 6 Workspace L@ % MATLAB
5 d <= 5 C
\m : #2 6s/ d
Z [ $ 6 '% R clear < . : d , <% 6 s /
$ 6 s / c d C >!1 JD( % clear c # % cha & 6 6f clear # % J m
. J5!1 C 5 , 1 5 MATLAB 9 7 : d % J , Z [ $ #( s / : d , MATLAB . b 2
5 MATLAB 5 % 50 % 5 ' ( ' 2f matlab.mat > % : 9 C 6 * $ 6 '% R save # % . b 2
$ #( . # load # % ,6
% # $
?5 9 5 i#5 . 5 <= : d , #"
RI L / 6 #+ ,: MATLAB C (
$ #(
5 I W % d <= jkj C :% ! d 6 6 % A cha Ah4 >1 u t Z [
$ 6 ? 9 'a' 6 6 0.56 #>9 3 % m C X 9 : d C = 'a' X = 0.56 # % cha $%#(
wv 5 hA % * 5 #5( 57 : . 6 3 2 >S 6 < W % # 3 %m C F = ? 9
] ! . # % cha $ :% ! d '% % 1
A = [1 2 3 4 5]
$ :% ! <= S A 1, 2, 3, 4, 5 %m '% 6 ? 9 a jkx F = jkx # %*
$ 5 6 '% R ; hA . 6 3 2 >S 7 = S A* C 6? 9 # #S = ( J Z [
# % cha $ % 7 F %0 L hA *
A = [1 ; 2 ; 3 ; 4 ; 5]
]%#( % 0 . #S xkj # = xkj %#( VA
A=
1
2
3
4
5
7 F %0 '% 6 % ) F . i ( wv hA * <= S A C ? 9
# %hc a $ 6 '% R ; hA .
A = [1 2 3 ; 4 5 6 ; 7 8 9]
] 6 %0 . #S zkz
A=
1 2 3
4 5 6
7 8 9
ans =
6
C 5( ' L '% % ! d # % 7 2 ' I : 6 % % answer ?R@ ans p Q/ d MATLAB
$ :% 1 d * % # % <= 7 2 m p Q / #S
] . JD( % . Q , % : +>,A :% 6 . #, [
Matlab
'+ , *"+
#5 %* 5, . %$ # % * '% ! " ‚ _# # CMATLAB #1 • m . D
$ . % / MATLAB ,
] :% Q , I #S = %m # # %* ,6 ) stem *"+
Matlab
m-file -
5 L 6 ' #@3% # J % = # C ( % . 6 7 : #2 6 6 # %% 9 1
#2 $ 6 ' 2f ' ( P; <= % MATLAB 6 work 2 ( % .m # / ( ! MATLAB %#2 _ #
] :% L Enter >6 6 ` MATLAB \ " % <= 6 # %*
Matlab
. /, %
5 a = zeros(m,n) # % cha $% 6 % 0 - T2 <# = ,6 6 % % %#7 9 # MATLAB %
'% R 5 ones # 5 % . zeros # 5 % 57 I $% ^I a <= 6 % 0 RS S A <# n F m
R5S 5 m j >5S 5F1 5S A 5- 9 eye(n) # % $%# : #2 j # S A , C 6
$ 6 % 0 n '. :
*1 2 3 MATLAB 0
5 5 5 D Image Processing 5 !97 $ MATLAB : > 1* , . D #; ) + B. % /
$ 2% / : #2 R ' ; B. % / /_# % % $% ^I 2 % + R ' ; B. % /
*1 4 +
‡5 •# RS KF 6 % % rxx RS * ( KF Pixel #; J D / Fm : C R ' #; %
$% % Q , ˆ% A #; J D / : ( KF < # * $ R ‡ •# rxx KF '
conv *"+
<% 56 #3 # 56 5 9 5 56 *5 $% 56 ) 5,A #5; 5 hc a5 ) + 5 5 5> 5 <# # % * ,6
5 ' 5,: 56 cameraman.tif 5 5 rx…krx… #5; . 6 9F1 $ > ‰ / #; ) + convolution
1 1 1
Q 5, 50 '% 56 ) ,A <= h =[ , , ] ‰ / I\ # > ' #2 %#( H MATLAB
3 3 3
] 6 7# <% 6 reshape '#" $ :%
Im = imread ( ' cameraman.tif ' );
I = im2double ( Im );
F = Filt ( 2 : end-1 );
imshow ( Out );
i#5 *5 5 ' ( ' #2 #; im2double _ ,6 C 6 J,A double i# . :'% % #
\m conv # % <#[
$ 6 J ! '% %
'. 5 5D 5 * 5 $%#5( *(#3# 6 0 - n-1 %#( VA Cn )#4 ‰ / > <% 6 #3 # 6
%5 5 . J5 D / 5 5 .J D/ F = Filt ( 2 : end-1 ) # % ,6 C ( D >S #; 7 2 #;
$ 6 6 7 2
9 % 6 B. % / 0 J ! % reshape 9 % 9 % #; J ! ) reshape _
$ #( B. % / ' ( ' [ : ) ! % #; # Cy 6 9F1 . '% R $% 6 #; 9 %
* $ 6 B. % / % reshape , 1 % ch!1 Z = ,6 Z : ) !% #; : F C 6 * 7 #
$ 6 m : ‚ ! 6 h = [−1,2,−1] ‰ / ^Iy > #; *(#3# 6 % D %
56 7 *8 *1 2 3
5 # J 5! <= . fft _ 5 5,6 5 6 J ! 9 ) + <= C
6 '.#- % #; B. % /
5 % % 5m < #5 angle abs _ # ,6 6 \> @ % fft _ 0 $
I Fast Fourier Transform
$% = % <= .
] :% <L 6 8 % 9 #S #; ) + B. % / )#S . 6 9F1
Im = imread('eight.tif');
I = im2double(Im);
% Fourier Transform
X = fft(x);
X = fftshift(X);
Matlab
absY = H .* absX;
Y = absY .* exp(j*angX);
Y = fftshift(Y);
y = ifft(Y);
y = real(y);
Out = reshape(y,row,col);
imshow(Out),title('High-pass Filter');
Navigational tools
immagbox Image Information tool
imoverview Adjust Contrast tool
imoverviewpanel Display range tool
imscrollpanel Pixel Information tool
Utility Functions
axes2pix Convert axes coordinate to pixel coordinate
getimage Get image data from axes
getimagemodel Retrieve imagemodel objects from image handles
imattributes Return information about image attributes
imgca Get handle to current image axes
imgcf Get handle to current image figure
imgetfile Image Open File dialog box
imhandles Get all image handles
impositionrect Create position rectangle
iptaddcallback Add function handle to callback list
iptcheckhandle Check validity of handle
iptgetapi Get Application Programmer Interface from a handle
ipticondir Directories containing IPT and MATLAB icons
iptremovecallback Delete function handle from callback list
iptwindowalign Align figure windows
truesize Adjust display size of image
Spatial Transformations
checkerboard Create checkerboard image
findbounds Find output bounds for spatial transformation
fliptform Flip the input and output roles of a TFORM structure
imcrop Crop image
Matlab
Image Registration
cp2tform Infer geometric transformation from control point pairs
cpcorr Tune control point locations using cross-correlation
cpselect Control point selection tool
cpstruct2pairs Convert CPSTRUCT to valid pairs of control points
normxcorr2 Normalized two-dimensional cross-correlation
Image Analysis
bwboundaries Trace region boundaries in binary image
bwtraceboundary Trace object in binary image
edge Find edges in intensity image
hough Hough transform
houghlines Extract line segments based on the Hough transform
houghpeaks Identify peaks in the Hough transform
qtdecomp Perform quadtree decomposition
qtgetblk Get block values in quadtree decomposition
qtsetblk Set block values in quadtree decomposition
Texture Analysis
entropy Entropy of an intensity image
entropyfilt Local entropy of an intensity image
graycomatrix Gray-level co-occurrence matrix
graycoprops Properties of a gray-level co-occurrence matrix
rangefilt Local range of an image
stdfilt Local standard deviation of an image
Image Arithmetic
imabsdiff Compute absolute difference of two images
imadd Add two images, or add constant to image
imcomplement Complement image
imdivide Divide two images, or divide image by constant
imlincomb Compute linear combination of images
immultiply Multiply two images, or multiply image by constant
imsubtract Subtract two images, or subtract constant from image
Image Enhancement
adapthisteq Perform adaptive histogram equalization using CLAHE
decorrstretch Apply a decorrelation stretch to a multi-channel image
histeq Enhance contrast using histogram equalization
imadjust Adjust image intensity values or colormap
imnoise Add noise to an image
intlut Compute new array values based on lookup table (LUT)
Matlab
Linear Filtering
conv2 Perform 2-D convolution (MATLAB function)
convmtx2 Compute 2-D convolution matrix
convn Perform N-D convolution (MATLAB function)
filter2 Perform 2-D filtering (MATLAB function)
fspecial Create predefined filters
imfilter Multidimensional image filtering
Image Transforms
dct2 Compute 2-D discrete cosine transform
dctmtx Compute discrete cosine transform matrix
fan2para Convert fan-beam projection data to parallel-beam
fanbeam Compute fan-beam transform
fft2 Compute 2-D fast Fourier transform (MATLAB function)
fftn Compute N-D fast Fourier transform (MATLAB function)
fftshift Reverse quadrants of output of FFT (MATLAB function)
idct2 Compute 2-D inverse discrete cosine transform
ifft2 Compute 2-D inverse fast Fourier transform (MATLAB function)
ifftn Compute N-D inverse fast Fourier transform (MATLAB function)
ifanbeam Compute inverse fan-beam transform
iradon Compute inverse Radon transform
para2fan Convert parallel-beam projections to fan-beam
phantom Generate a head phantom image
radon Compute Radon transform
Binary Images
applylut Perform neighborhood operations using lookup tables
bwarea Area of objects in binary image
bwareaopen
bwdist Distance transform
bweuler Euler number of binary image
bwhitmiss Binary hit-and-miss operation
bwlabel Label connected components in 2-D binary image
bwlabeln Label connected components in N-D binary image
bwmorph Perform morphological operations on binary image
bwpack Pack binary image
bwperim Find perimeter of objects in binary image
bwselect Select objects in binary image
bwulterode Ultimate erosion
bwunpack Unpack a packed binary image
imregionalmin Regional minima of image
imtophat Perform tophat filtering
makelut Construct lookup table for use with applylut
Region-Based Processing
poly2mask Convert region-of-interest polygon to mask
roicolor Select region of interest, based on color
roifill Smoothly interpolate within arbitrary region
roifilt2 Filter a region of interest
roipoly Select polygonal region of interest
Colormap Manipulation
brighten Brighten or darken colormap (MATLAB function)
cmpermute Rearrange colors in colormap
cmunique Find unique colormap colors and corresponding image
colormap Set or get color lookup table (MATLAB function)
imapprox Approximate indexed image by one with fewer colors
rgbplot Plot RGB colormap components (MATLAB function)
Toolbox Preferences
iptgetpref Get value of Image Processing Toolbox preference
iptsetpref Set value of Image Processing Toolbox preference
Array Operations
circshift Shift array circularly (MATLAB function)
padarray Pad an array
Demos
iptdemos Display index of Image Processing Toolbox demos
Performance
ippl Check for presence of Intel Performance Primitives Library (IPPL)
@A3B *8 > 9 ; # $
] b@ #S % s P - >,7 [ % J ( #I eh/y '.#- % LTI , J ! _ 6 %
Matlab
$ : !F1 Pi : RS Z i C ' k 6
] 6J ! . JD( 7 : 6 J ! _ * : #2
$ 6 J ! _ JD( Q , % 3 0 % tf _ . '% R
%'" +F
5 6p 5 $ . 7 '% 6 P 6 : ?> @ , # feedback parallel Cseries _ # ,6
] . . : #2
impulse ; ' G H+ 3 I+
Matlab
sigma ; KE
ltiview <
]% 6 _# #2 . < \! : %#, ,: < # * ,6
Matlab
Matlab
Matlab
Matlab
sisotool <
$ Single Input Single Output 7 2 % , J >" - 4 sisotool
Matlab
simulink <
* $ D I I % s#> ,6 MATLAB ?> @ , 7 <% 6 % #1 simulink
5 i#5 6#> J ( 6 * @ 6 simulink # % 7 $%#( '% R A# : !97 • ! % #
]% I 1 6e % %
Data Extraction
dssdata Descriptor version of ssdata
frdata Extract frequency-response data
lti/get Access values of LTI model properties
ssdata Extract state-space matrices
tfdata Extract numerators and denominators
zpkdata Extract zero/pole/gain data
Conversions
c2d Convert from continuous- to discrete-time models
chunits Convert the units property for FRD models
d2c Convert from discrete- to continuous-time models
d2d Test true for continuous-time models
frd Convert to a frequency-response data model
ss Convert to a state-space model
Matlab
System Interconnections
append Group LTI systems by appending inputs and outputs
connect Derive state-space models from block diagram descriptions
feedback Feedback connections of two systems
lft Generalized feedback interconnection (Redheffer star product)
parallel Generalized parallel connection (see also overloaded +)
series Generalized series connection (see also overloaded *)
Classical Design
rlocus Evans root locus
sisotool SISO design GUI (root locus and loop-shaping techniques)
Pole Placement
acker SISO pole placement
estim Form estimator given estimator gain
place MIMO pole placement
reg Form regulator given state-feedback and estimator gain
LQR/LQG Design
augstate Augment output by appending states
lqg Single-step LQG design
Matlab
State-Space Models
balreal Grammian-based input/output balancing
canon State-space canonical forms
ctrb Controllability matrix
gram Controllability and observability grammians
minreal Minimal realization and pole/zero cancellation
modred Model state reduction
margin Calculate gain and phase margins
ngrid Superimpose grid lines on a Nichols plot
nichols Calculate Nichols plot
nyquist Calculate Nyquist plot
obsv Observability matrix
sminreal Structurally minimal realization
ss2ss State coordinate transformation
ssbal Diagonal balancing of state-space realizations
Time Delays
delay2z Replace delays by poles at z=0 or FRD phase shift
hasdelay True for models with time delays
pade Pade approximation of time delays
totaldelay Total delay between each input/output pair