matlab实验一、二

matlab实验一、二

ID:40564021

大小:49.50 KB

页数:10页

时间:2019-08-04

matlab实验一、二_第1页
matlab实验一、二_第2页
matlab实验一、二_第3页
matlab实验一、二_第4页
matlab实验一、二_第5页
资源描述:

《matlab实验一、二》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、>>X=magic(3)X=816357492>>K=eye(3)K=100010001>>L=zeros(3)L=000000000>>M=ones(3)M=111111111>>Y=(123;456;789)???Y=(123;456;789)

2、Error:UnexpectedMATLABexpression.>>Y=[123;456;789]Y=123456789>>Z=zeros(4,5)Z=00000000000000000000>>A=magic(4)A=16231351110897612414151>>A1=zeros(size(A))A1=0000000000000000>>

3、B=rand(5)B=0.81470.09750.15760.14190.65570.90580.27850.97060.42180.03570.12700.54690.95720.91570.84910.91340.95750.48540.79220.93400.63240.96490.80030.95950.6787>>n=find(B<0.4)n=367111622>>B(n)=B(n)+1B=0.81471.09751.15761.14190.65570.90581.27850.97060.42181.03571.12700.54690.95720.91570.84910.91340

4、.95750.48540.79220.93400.63240.96490.80030.95950.6787>>C1=B(1:2:end,:)C1=0.81471.09751.15761.14190.65571.12700.54690.95720.91570.84910.63240.96490.80030.95950.6787>>C2=B([3,2,1],[2,3,4])C2=0.54690.95720.91571.27850.97060.42181.09751.15761.1419>>X+Yans=93971013111711>>X-Yans=7-13-101-31-7>>X*Yans=54

5、69847287102546984>>X/YWarning:Matrixissingulartoworkingprecision.ans=NaNInf-InfNaN-InfInfNaN-InfInf>>XYans=0.01670.08330.15000.76670.83330.90000.01670.08330.1500>>K/YWarning:Matrixissingulartoworkingprecision.ans=NaNInf-InfNaN-InfInfNaNInf-Inf>>X/MWarning:Matrixissingulartoworkingprecision.ans=Inf

6、NaNNaN-InfNaNNaNInfNaNNaN>>d=X/YWarning:Matrixissingulartoworkingprecision.d=NaNInf-InfNaN-InfInfNaN-InfInf>>d=(X^-1)*Yd=0.01670.08330.15000.76670.83330.90000.01670.08330.1500>>X*(Y^-1)Warning:Matrixisclosetosingularorbadlyscaled.Resultsmaybeinaccurate.RCOND=1.541976e-018.ans=1.0e+017*-0.54041.0809

7、-0.54040.0000000.5404-1.08090.5404(X>=Y).*Xans=806057090>>p=[3,4.2,0,-5,-6.8,5]p=3.00004.20000-5.0000-6.80005.0000>>x=roots(p)x=-1.5771-0.6897+1.1756i-0.6897-1.1756i0.97050.5861>>x=1:1:30x=Columns1through1312345678910111213Columns14through2614151617181920212223242526Columns27through3027282930>>y=po

8、lyval(p,x)y=1.0e+007*Columns1through70.00000.00000.00010.00040.00120.00290.0060Columns8through140.01150.02040.03410.05440.08330.12330.1774Columns15through210.24900.34200.46090.61080.79741.02701.3067Columns2

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。