Simulink中的界面截图.docx
- 文档编号:15358487
- 上传时间:2023-07-03
- 格式:DOCX
- 页数:6
- 大小:144.93KB
Simulink中的界面截图.docx
《Simulink中的界面截图.docx》由会员分享,可在线阅读,更多相关《Simulink中的界面截图.docx(6页珍藏版)》请在冰点文库上搜索。
Simulink中的界面截图
Contents
DocumentationCenter
MATLAB
GettingStartedwithMATLAB
Examples
ReleaseNotes
MATLABFunctions
LanguageFundamentals
Mathematics
ElementaryMath
LinearAlgebra
StatisticsandRandomNumbers
Interpolation
1-DInterpolation
Functions
interp1
griddedInterpolant
pchip
spline
ppval
mkpp
unmkpp
padecoef
interpft
ExamplesandHowTo
InterpolationofMultiple1-DValueSets
GriddedDataInterpolation
ScatteredDataInterpolation
Optimization
NumericalIntegrationandDifferentialEquations
FourierAnalysisandFiltering
SparseMatrices
ComputationalGeometry
Graphics
ProgrammingScriptsandFunctions
DataandFileManagement
GUIBuilding
AdvancedSoftwareDevelopment
DesktopEnvironment
SearchMATLABDocumentation
$("input[name='qdoc']").toggleVal({
focusClass:
"hasFocus"
});
R2013aMATLABMathematicsInterpolation1-DInterpolation
splineCubicsplinedatainterpolation
Syntaxyy=spline(x,Y,xx)pp=spline(x,Y)Descriptionyy=spline(x,Y,xx)usesa
cubicsplineinterpolationtofindyy,thevalues
oftheunderlyingfunctionYatthevaluesofthe
interpolantxx.Fortheinterpolation,theindependent
variableisassumedtobethefinaldimensionofYwith
thebreakpointsdefinedbyx.Thesizesofxxandyyare
relatedasfollows:
IfYisascalarorvector,yyhas
thesamesizeasxx.IfYisanarraythatisnota
vector,Ifxxisascalarorvector,size(yy)equals[d1,
d2,...,dk,length(xx)].Ifxxisanarrayofsize[m1,m2,...,mj],size(yy)equals[d1,d2,...,dk,m1,m2,...,mj].pp=spline(x,Y)returns
thepiecewisepolynomialformofthecubicsplineinterpolantfor
laterusewithppvalandthesplineutilityunmkpp.xmust
beavector.Ycanbeascalar,avector,oran
arrayofanydimension,subjecttothefollowingconditions:
IfxandYarevectorsofthesamesize,thenot-a-knot
endconditionsareused.IfxorYisascalar,itisexpandedtohavethe
samelengthastheotherandthenot-a-knotendconditionsareused.
(SeeExceptions
(1)below).IfYisavectorthatcontainstwomorevaluesthan
xhasentries,thefirstandlastvalueinYareusedastheendslopes
forthecubicspline.(SeeExceptions
(2)below.)ExceptionsIfYis
avectorthatcontainstwomorevaluesthanxhas
entries,thefirstandlastvalueinYareused
astheendslopesforthecubicspline.IfYis
avector,thismeansf(x)=Y(2:
end-1)df(min(x))=Y
(1)df(max(x))=Y(end)IfYis
amatrixoranN-dimensionalarraywithsize(Y,N)equal
tolength(x)+2,thefollowinghold:
f(x(j))matchesthevalueY(:
...,:
j+1)forj=1:
length(x)Df(min(x))matchesY(:
:
...:
1)Df(max(x))matchesY(:
:
...:
end)Note
Youcanalsoperformsplineinterpolationusingtheinterp1functionwiththecommandinterp1(x,y,xx,'spline').
Notethatwhilesplineperformsinterpolationon
rowsofaninputmatrix,interp1performsinterpolation
oncolumnsofaninputmatrix.ExamplesExample1Thisgeneratesasinecurve,thensamplesthesplineovera
finermesh.x=0:
10;
y=sin(x);
xx=0:
.25:
10;
yy=spline(x,y,xx);
plot(x,y,'o',xx,yy)
Example2Thisillustratestheuseofclampedorcompletesplineinterpolation
whereendslopesareprescribed.Zeroslopesattheendsofaninterpolant
tothevaluesofacertaindistributionareenforced.x=-4:
4;
y=[0.151.122.362.361.46.49.060];
cs=spline(x,[0y0]);
xx=linspace(-4,4,101);
plot(x,y,'o',xx,ppval(cs,xx),'-');
Example3Thetwovectorst=1900:
10:
1990;
p=[75.99591.972105.711123.203131.669...
150.697179.323203.212226.505249.633];representthecensusyearsfrom1900to1990andthecorresponding
UnitedStatespopulationinmillionsofpeople.Theexpressionspline(t,p,2000)usesthecubicsplinetoextrapolateandpredictthepopulation
intheyear2000.Theresultisans=
270.6060Example4Thestatementsx=pi*[0:
.5:
2];
y=[010-1010;
1010-101];
pp=spline(x,y);
yy=ppval(pp,linspace(0,2*pi,101));
plot(yy(1,:
),yy(2,:
),'-b',y(1,2:
5),y(2,2:
5),'or'),axisequalgeneratetheplotofacircle,withthefivedatapointsy(:
2),...,y(:
6)marked
witho's.Notethatthisycontainstwomorevalues
(i.e.,twomorecolumns)thandoesx,hencey(:
1)andy(:
end)are
usedasendslopes.
Example5Thefollowingcodegeneratessineandcosinecurves,thensamples
thesplinesoverafinermesh.x=0:
.25:
1;
Y=[sin(x);cos(x)];
xx=0:
.1:
1;
YY=spline(x,Y,xx);
plot(x,Y(1,:
),'o',xx,YY(1,:
),'-');holdon;
plot(x,Y(2,:
),'o',xx,YY(2,:
),':
');holdoff;
MoreAboutexpandallAlgorithmsAtridiagonallinearsystem(with,possibly,severalrightsides)
isbeingsolvedfortheinformationneededtodescribethecoefficients
ofthevariouscubicpolynomialswhichmakeuptheinterpolatingspline.splineuses
thefunctionsppval,mkpp,
andunmkpp.Theseroutinesformasmallsuite
offunctionsforworkingwithpiecewisepolynomials.Foraccessto
moreadvancedfeatures,seetheinterp1reference
page,thecommand-linehelpforthesefunctions,andtheCurveFittingToolbox™spline
functions.References[1]deBoor,C.,APracticalGuide
toSplines,Springer-Verlag,1978.SeeAlsointerp1|mkpp|pchip|ppval|unmkpp
Wasthistopichelpful?
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Simulink 中的 界面 截图