您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > Matlab数学实验第二版课后习题答案
Matlab数学实验第二版课后习题答案胡良剑第一章%Page20,ex1(5)等于[exp(1),exp(2);exp(3),exp(4)](7)3=1*3,8=2*4(8)a为各列最小值,b为最小值所在的行号(10)1=4,false,2=3,false,3=2,ture,4=1,ture(11)答案表明:编址第2元素满足不等式(30=20)和编址第4元素满足不等式(40=10)(12)答案表明:编址第2行第1列元素满足不等式(30=20)和编址第2行第2列元素满足不等式(40=10)%Page20,ex2(1)a,b,c的值尽管都是1,但数据类型分别为数值,字符,逻辑,注意a与c相等,但他们不等于b(2)double(fun)输出的分别是字符a,b,s,(,x,)的ASCII码%Page20,ex3r=2;p=0.5;n=12;T=log(r)/n/log(1+0.01*p)T=11.5813%Page20,ex4x=-2:0.05:2;f=x.^4-2.^x;[fmin,min_index]=min(f)fmin=-1.3907%最小值min_index=54%最小值点编址x(min_index)ans=0.6500%最小值点[f1,x1_index]=min(abs(f))%求近似根--绝对值最小的点f1=0.0328x1_index=24x(x1_index)ans=-0.8500x(x1_index)=[];f=x.^4-2.^x;%删去绝对值最小的点以求函数绝对值次小的点[f2,x2_index]=min(abs(f))%求另一近似根--函数绝对值次小的点f2=0.0630x2_index=65x(x2_index)ans=1.2500%Page20,ex5z=magic(10)z=929918156774515840988071416735557644148188202254566370478587192136062697128869325296168755234172476839042492633652358289914830323966796139597293138457210129496783537444653111810077843643502759sum(z)ans=505505505505505505505505505505sum(diag(z))ans=505z(:,2)/sqrt(3)ans=57.157746.188046.765450.229553.693613.85642.88683.46416.928210.3923z(8,:)=z(8,:)+z(3,:)z=9299181567745158409880714167355576441481882022545663704785871921360626971288693252961687552341724768390424926336523582899148303239668387101115119838710111511910129496783537444653111810077843643502759
本文标题:Matlab数学实验第二版课后习题答案
链接地址:https://www.777doc.com/doc-5632810 .html