matlab 实验一Word文档下载推荐.docx
- 文档编号:20373179
- 上传时间:2023-01-22
- 格式:DOCX
- 页数:11
- 大小:28.38KB
matlab 实验一Word文档下载推荐.docx
《matlab 实验一Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《matlab 实验一Word文档下载推荐.docx(11页珍藏版)》请在冰豆网上搜索。
35
3).*B(:
12
15
3)*B(2,:
101010
121212
A*B
242424
303030
202020
A.*B
715
41012
9315
A^2
661766
423370
381346
A.^2
49125
42536
9125
B/A
0.18420.2105-0.2368
0.36840.4211-0.4737
0.55260.6316-0.7105
B./A
0.14291.00000.2000
1.00000.40000.3333
1.00003.00000.6000
x=logspace(0,5,6)
x=
Columns1through5
110100100010000
Column6
100000
x=linspace(0,10,11)
012345678910
x=[0:
1:
10]
a=[12;
34];
b=[22;
22];
c=a*b
c=
66
1414
c=a.*b
24
68
c=a/b
Warning:
Matrixisclosetosingularorbadlyscaled.
Resultsmaybeinaccurate.RCOND=5.551115e-017.
1.0e+015*
-2.25182.2518
c=a./b
0.50001.0000
1.50002.0000
x=[-4.85-2.3-0.21.34.566.75];
ceil(x)
-4-20257
fix(x)
-4-20146
floor(x)
-5-3-1146
round(x)
-5-20157
a=[5:
15];
b=[12887101211131415];
y=a==b
y=
Columns1through10
0001010011
Column11
X=[01;
10];
Y=[00;
X&
Y
00
10
X=[01;
X|Y
01
~X
x=[01;
y=[00;
x&
y+x>
y
ans
a=magic(3);
b=243;
savemyvarab;
clear;
loadmyvar;
who
a,b
Yourvariablesare:
ab
a=
816
357
492
b=
243
w=sqrt
(2)*(1+0.34245*10^(-6))
w=
1.4142
a=3.5;
b=5;
c=-9.8;
x=(2*pi*a+(b+c)/(pi+a*b*c)-exp
(2))/(tan(b+c)+a)
0.9829
x=1:
0.1:
10;
plot(sin(x))
helpplot
PLOTLinearplot.
PLOT(X,Y)plotsvectorYversusvectorX.IfXorYisamatrix,
thenthevectorisplottedversustherowsorcolumnsofthematrix,
whicheverlineup.IfXisascalarandYisavector,length(Y)
disconnectedpointsareplotted.
PLOT(Y)plotsthecolumnsofYversustheirindex.
IfYiscomplex,PLOT(Y)isequivalenttoPLOT(real(Y),imag(Y)).
InallotherusesofPLOT,theimaginarypartisignored.
Variouslinetypes,plotsymbolsandcolorsmaybeobtainedwith
PLOT(X,Y,S)whereSisacharacterstringmadefromoneelement
fromanyorallthefollowing3columns:
bblue.point-solid
ggreenocircle:
dotted
rredxx-mark-.dashdot
ccyan+plus--dashed
mmagenta*star(none)noline
yyellowssquare
kblackddiamond
vtriangle(down)
^triangle(up)
<
triangle(left)
>
triangle(right)
ppentagram
hhexagram
Forexample,PLOT(X,Y,'
c+:
'
)plotsacyandottedlinewithaplus
ateachdatapoint;
PLOT(X,Y,'
bd'
)plotsbluediamondateachdata
pointbutdoesnotdrawanyline.
PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,...)combinestheplotsdefinedby
the(X,Y,S)triples,wheretheX'
sandY'
sarevectorsormatrices
andtheS'
sarestrings.
y-'
X,Y,'
go'
)plotsthedatatwice,witha
solidyellowlineinterpolatinggreencirclesatthedatapoints.
ThePLOTcommand,ifnocolorisspecified,makesautomaticuseof
thecolorsspecifiedbytheaxesColorOrderproperty.Thedefault
ColorOrderislistedinthetableaboveforcolorsystemswherethe
defaultisblueforoneline,andformultiplelines,tocycle
throughthefirstsixcolorsinthetable.Formonochromesystems,
PLOTcyclesovertheaxesLineStyleOrderproperty.
Ifyoudonotspecifyamarkertype,PLOTusesnomarker.
Ifyoudonotspecifyalinestyle,PLOTusesasolidline.
PLOT(AX,...)plotsintotheaxeswithhandleAX.
PLOTreturnsacolumnvectorofhandlestolineseriesobjects,one
handleperplottedline.
TheX,Ypairs,orX,Y,Striples,canbefollowedby
parameter/valuepairstospecifyadditionalproperties
ofthelines.Forexample,PLOT(X,Y,'
LineWidth'
2,'
Color'
[.600])
willcreateaplotwithadarkredlinewidthof2points.
Backwardscompatibility
PLOT('
v6'
...)createslineobjectsinsteadoflineseries
objectsforcompatibilitywithMATLAB6.5andearlier.
Seealsoplottools,semilogx,semilogy,loglog,plotyy,plot3,grid,
title,xlabel,ylabel,axis,axes,hold,legend,subplot,scatter.
Overloadedfunctionsormethods(oneswiththesamenameinotherdirectories)
helptimeseries/plot.m
helpphytree/plot.m
helpchannel/plot.m
helpcfit/plot.m
helpfints/plot.m
helpidmodel/plot.m
helpidfrd/plot.m
helpiddata/plot.m
helpcgrules/plot.m
helpxregtwostage/plot.m
helpxregtransient/plot.m
helpxregmodel/plot.m
helpxregarx/plot.m
helplocalmulti/plot.m
helplocalmod/plot.m
helplocalavfit/plot.m
helpsweepset/plot.m
helpmdevtestplan/plot.m
helpcgdatasetnode/plot.m
helpmpc/plot.m
helprfckt/plot.m
helpfrd/plot.m
helpdspdata/plot.m
helpwdectree/plot.m
helpntree/plot.m
helpdtree/plot.m
helpwvtree/plot.m
helprwvtree/plot.m
helpedwttree/plot.m
ReferencepageinHelpbrowser
docplot
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- matlab 实验一 实验