- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
15、今有多项式P1(x)=x4-2x+1,P2(x)=x2+4x-0.5,要求先求得P(x)=P1(x)+P2(x),然后计算xi=0.2*i各点上的P(xi)(i=0,1,2,…,5)值。
p1=[1.0 0.0 0.0 -2.0 1.0];
p2=[0.0 0.0 1.0 4.0 -0.5];
p1x=poly2sym(p1);p2x=poly2sym(p2);
p=p1x+p2x
p =
x^4+2*x+1/2+x^2
x=0:5;
x.^4+2*x+1/2+x.^2
ans =
0.5000 4.5000 24.5000 96.5000 280.5000 660.5000
1、 试个MATLAB的工作空间中建立以下2个矩阵:A=[1 2] ,求出矩阵A和B的乘积,并将结果赋给变量C。
A=[1 2]
A =
1 2
B=[1 2
3 4]
B =
1 2
3 4
C=A*B
C =
7 10
2、 利用MATLAB提供的帮助信息,了解inv命令的调用格式,并作简要说明。
help inv
INV Matrix inverse.
INV(X) is the inverse of the square matrix X.
A warning message is printed if X is badly scaled or
nearly singular.
See also SLASH, PINV, COND, CONDEST, LSQNONNEG, LSCOV.
Overloaded methods
help gf/inv.m
help zpk/inv.m
help tf/inv.m
help ss/inv.m
help lti/inv.m
help frd/inv.m
help sym/inv.m
help idmodel/inv.m
3、 使用help命令查询函数plot的功能以及调用方法,然后利用plot命令绘制函数y=sin(x)的图形,其中。
help plot
PLOT Linear plot.
PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
then the vector is plotted versus the rows or columns of the matrix,
whichever line up. If X is a scalar and Y is a vector, length(Y)
disconnected points are plotted.
PLOT(Y) plots the columns of Y versus their index.
If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y)).
In all other uses of PLOT, the imaginary part is ignored.
Various line types, plot symbols and colors may be obtained with
PLOT(X,Y,S) where S is a character string made from one element
from any or all the following 3 columns:
b blue . point - solid
g green o circle : dotted
r red x x-mark -. dashdot
c cyan + plus -- dashed
m magenta * star
y yellow s square
原创力文档


文档评论(0)