,FornyournconveniencenApressnhasnplacednsomenofnthenfrontn
matternmaterialnafternthenindex.nPleasenusenthenBookmarksn
andnContentsnatnanGlancenlinksntonaccessnthem.
,Contents at a Glance n n n
AboutnthenAuthor .......................................................................................................... ix
■ Chaptern1:nIntroducingnMATLABnandnthenMATLABnWorkingnEnvironment .......................... 1
■ Chaptern2:nVariables,nNumbers,nOperatorsnandnFunctions ............................................. 23
■ Chaptern3:nControlnSystems ....................................................................................... 77
■ Chaptern4:nRobustnPredictivenControl ....................................................................... 145
iii
, CHAPTER 1 n
Introducing MATLAB and the MATLAB W n n n n n
orking Environment n
Introduction
MATLABn isn an platformn forn scientificn calculationn andn high-
leveln programmingn whichn usesn ann interactiven environmentnthatn allowsn youn ton conductn complexn calculationn tasksn more
n efficientlyn thann withn traditionaln languages,n suchn asn C,n C++nandnFORTRAN.nItnisnthenonenofnthenmostnpopularnplatfo
rmsncurrentlynusedninnthensciencesnandnengineering.
MATLABnisnanninteractivenhigh-
levelntechnicalncomputingnenvironmentnfornalgorithmndevelopment,ndatanvisualization,ndatananalysisnandnnumericalnanaly
sis.nMATLABnisnsuitablenfornsolvingnproblemsninvolvingntechnicalncalculationsnusingnoptimizednalgorithmsnthatnarenincor
poratednintoneasyntonusencommands.
ItnisnpossiblentonusenMATLABnfornanwidenrangenofnapplications,nincludingncalculus,nalgebra,nstatistics,neconometrics,
n qualityncontrol,ntimenseries, nsignalnandnimagenprocessing,ncommunications,ncontrolnsystemndesign,ntestingnandnm
easuringn systems,n financialn modeling,n computationaln biology,n etc.n Then complementaryn toolsets,n calledn toolboxesn(colle
ctionsnofnMATLABnfunctionsnfornspecialnpurposes,nwhichnarenavailablenseparately),nextendnthenMATLABnenvironment,na
llowingnyountonsolvenspecialnproblemsninndifferentnareasnofnapplication.
Inn addition,n MATLABn containsn an numbern ofn functionsn whichn allown youn ton documentn andn sharen yourn work.
nItn isn possiblen ton integraten MATLABn coden withn othern languagesn andn applications,n andn ton distributen algorithmsn an
dnapplicationsnthatnarendevelopednusingnMATLAB.
ThenfollowingnarenthenmostnimportantnfeaturesnofnMATLAB:
• Itnisnanhigh-levelnlanguagenforntechnicalncalculation
• Itn offersn an developmentn environmentn forn managingn code,n filesn andn data
• Itnfeaturesninteractiventoolsnfornexploration,ndesignnandniterativensolving
• Itn supportsn mathematicaln functionsn forn linearn algebra,n statistics,n Fouriern analysis,n filtering,n
optimization,nandnnumericalnintegration
• Itn cann producen highn qualityn two-dimensionaln andn three-
dimensionaln graphicsn ton aidn datanvisualization
• Itn includesn toolsn ton createn customn graphicaln usern interfaces
• Itncannbenintegratednwithnexternalnlanguages,nsuchnasnC/C++,nFORTRAN,nJava,nCOM,nan
dnMicrosoftnExcel
ThenMATLABndevelopmentnenvironmentnallowsnyountondevelopnalgorithms,nanalyzendata,ndisplayndatanfilesnandnma
nagenprojectsninninteractivenmoden(seenFiguren1-1).
1
matternmaterialnafternthenindex.nPleasenusenthenBookmarksn
andnContentsnatnanGlancenlinksntonaccessnthem.
,Contents at a Glance n n n
AboutnthenAuthor .......................................................................................................... ix
■ Chaptern1:nIntroducingnMATLABnandnthenMATLABnWorkingnEnvironment .......................... 1
■ Chaptern2:nVariables,nNumbers,nOperatorsnandnFunctions ............................................. 23
■ Chaptern3:nControlnSystems ....................................................................................... 77
■ Chaptern4:nRobustnPredictivenControl ....................................................................... 145
iii
, CHAPTER 1 n
Introducing MATLAB and the MATLAB W n n n n n
orking Environment n
Introduction
MATLABn isn an platformn forn scientificn calculationn andn high-
leveln programmingn whichn usesn ann interactiven environmentnthatn allowsn youn ton conductn complexn calculationn tasksn more
n efficientlyn thann withn traditionaln languages,n suchn asn C,n C++nandnFORTRAN.nItnisnthenonenofnthenmostnpopularnplatfo
rmsncurrentlynusedninnthensciencesnandnengineering.
MATLABnisnanninteractivenhigh-
levelntechnicalncomputingnenvironmentnfornalgorithmndevelopment,ndatanvisualization,ndatananalysisnandnnumericalnanaly
sis.nMATLABnisnsuitablenfornsolvingnproblemsninvolvingntechnicalncalculationsnusingnoptimizednalgorithmsnthatnarenincor
poratednintoneasyntonusencommands.
ItnisnpossiblentonusenMATLABnfornanwidenrangenofnapplications,nincludingncalculus,nalgebra,nstatistics,neconometrics,
n qualityncontrol,ntimenseries, nsignalnandnimagenprocessing,ncommunications,ncontrolnsystemndesign,ntestingnandnm
easuringn systems,n financialn modeling,n computationaln biology,n etc.n Then complementaryn toolsets,n calledn toolboxesn(colle
ctionsnofnMATLABnfunctionsnfornspecialnpurposes,nwhichnarenavailablenseparately),nextendnthenMATLABnenvironment,na
llowingnyountonsolvenspecialnproblemsninndifferentnareasnofnapplication.
Inn addition,n MATLABn containsn an numbern ofn functionsn whichn allown youn ton documentn andn sharen yourn work.
nItn isn possiblen ton integraten MATLABn coden withn othern languagesn andn applications,n andn ton distributen algorithmsn an
dnapplicationsnthatnarendevelopednusingnMATLAB.
ThenfollowingnarenthenmostnimportantnfeaturesnofnMATLAB:
• Itnisnanhigh-levelnlanguagenforntechnicalncalculation
• Itn offersn an developmentn environmentn forn managingn code,n filesn andn data
• Itnfeaturesninteractiventoolsnfornexploration,ndesignnandniterativensolving
• Itn supportsn mathematicaln functionsn forn linearn algebra,n statistics,n Fouriern analysis,n filtering,n
optimization,nandnnumericalnintegration
• Itn cann producen highn qualityn two-dimensionaln andn three-
dimensionaln graphicsn ton aidn datanvisualization
• Itn includesn toolsn ton createn customn graphicaln usern interfaces
• Itncannbenintegratednwithnexternalnlanguages,nsuchnasnC/C++,nFORTRAN,nJava,nCOM,nan
dnMicrosoftnExcel
ThenMATLABndevelopmentnenvironmentnallowsnyountondevelopnalgorithms,nanalyzendata,ndisplayndatanfilesnandnma
nagenprojectsninninteractivenmoden(seenFiguren1-1).
1