ans = 1.5708 - 1.9426i ans = 1.2357 ans = 4.9371 - 0.4270i 2.第二题程序: a=rand(10,15) max(a) min(a) sum(a) mean(a) sort(a) length(a) size(a) 第二题运行结果: a = 0.4514 0.6085 0.0841 0.1210 0.2319 0.4398 0.9342 0.1370 0.4225 0.2974 0.3759 0.1939 0.6273 0.7165 0.1146 0.0439 0.0158 0.4544 0.4508 0.2393 0.3400 0.2644 0.8188 0.8560 0.0492 0.0099 0.9048 0.6991 0.5113 0.6649 0.0272 0.0164 0.4418 0.7159 0.0498 0.3142 0.1603 0.4302 0.4902 0.6932 0.4199 0.5692 0.3972 0.7764 0.3654 0.3127 0.1901 0.3533 0.8928 0.0784 0.3651 0.8729 0.8903 0.8159 0.6501 0.7537 0.6318 0.4136 0.4893 0.1400 0.0129 0.5869 0.1536 0.2731 0.6408 0.3932 0.2379 0.7349 0.4608 0.9830 0.7939 0.2344 0.6552 0.1859 0.5668 0.3840 0.0576 0.6756 0.2548 0.1909 0.5915 0.6458 0.6873 0.4574 0.5527 0.9200 0.5488 0.8376 0.7006 0.8230 0.6831 0.3676 0.6992 0.8656 0.8439 0.1197 0.9669 0.3461 0.4507 0.4001 0.8447 0.9316 0.3716 0.9827 0.6739 0.0928 0.6315 0.7275 0.2324 0.1739 0.0381 0.6649 0.1660 0.4122 0.1988 0.3678 0.3352 0.4253 0.8066 0.9994 0.0353 0.7176 0.4784 0.8049 0.1708 0.4586 0.8704 0.1556 0.9016 0.6252 0.6208 0.6555 0.5947 0.7036 0.9616 0.6124 0.6927 0.5548 0.9084 0.9943 0.8699 0.0099 0.1911 0.0056 0.7334 0.7313 0.3919 0.5657 0.4850 0.0589 ans = 0.6831 0.7176 0.7275 0.9084 0.9943 0.8699 0.9669 0.8903 0.9016 0.9830 0.9200 0.9316 0.8376 0.9827 0.9994 ans = 0.0129 0.0158 0.0841 0.1210 0.0498 0.0381 0.0099 0.1370 0.0056 0.0492 0.0099 0.1939 0.3716 0.1859 0.0589 ans = 2.6557 3.8846 4.6227 5.5196 3.6139 3.9302 5.6277 4.5574 5.2728 5.1829 5.8377 5.3971 5.5873 6.3580 5.3686 ans = 0.2656 0.3885 0.4623 0.5520 0.3614 0.3930 0.5628 0.4557 0.5273 0.5183 0.5838 0.5397 0.5587 0.6358 0.5369 ans = 0.0129 0.0158 0.0841 0.1210 0.0498 0.0381 0.0099 0.1370 0.0056 0.0492 0.0099 0.1939 0.3716 0.1859 0.0589 0.0272 0.0164 0.1536 0.2324 0.0784 0.1197 0.1603 0.1556 0.4122 0.1988 0.3678 0.2344 0.3972 0.4850 0.1146 0.0353 0.0576 0.3533 0.2548 0.1708 0.3142 0.2379 0.1660 0.4225 0.2974 0.3759 0.3352 0.4136 0.4893 0.1400 0.0439 0.1901 0.4418 0.2731 0.1739 0.3400 0.2644 0.1911 0.4507 0.4001 0.4199 0.3919 0.4253 0.5113 0.3654 0.0928 0.3676 0.4544 0.4508 0.1909 0.3651 0.6458 0.3461 0.4574 0.5527 0.6208 0.5488 0.5657 0.7006 0.5668 0.3127 0.5869 0.4784 0.7159 0.2319 0.3932 0.6649 0.4302 0.4608 0.6252 0.7313 0.5692 0.5947 0.7036 0.6649 0.3840 0.6085 0.5548 0.8049 0.2393 0.4398 0.8704 0.6873 0.4902 0.6501 0.7537 0.6318 0.6273 0.7165 0.6739 0.4514 0.6315 0.6756 0.8656 0.6408 0.4586 0.8729 0.7349 0.8159 0.6932 0.7939 0.6555 0.6552 0.7764 0.8230 0.6124 0.6927 0.6992 0.8928 0.8439 0.5915 0.9342 0.8188 0.8560 0.7334 0.8447 0.9048 0.6991 0.8066 0.9616 0.6831 0.7176 0.7275 0.9084 0.9943 0.8699 0.9669 0.8903 0.9016 0.9830 0.9200 0.9316 0.8376 0.9827 0.9994 ans = 15 ans = 10 15 3.第三题程序: E=eye(3); R=rand(3,2); O=zeros(2,3); v=[3 2]; S=diag(v); A=[E,R;O,S] M=A^2 N=[E,R+R*S;O,S^2] 第三题运行结果: A =