clc,clear,clf,close all;
disp('题解4.5,4.6,4.7');pause;
echo on;
a=[3 4 7 2 9 12],
roots(a),
pause,
b=[1 0 0 0 0 -1],
roots(b),
pause,
c=[-3 -5 -8 -9],
poly(c),
echo off;
disp('题解4.8');pause;
echo on;
a=[1 2 5 4 3],b=[1],
[r,p,k]=residue(b,a)
pause,
t=0:0.2:10;
ys=r(1)*exp(p(1)*t)+r(2)*exp(p(2)*t)+r(3)*exp(p(3)*t)+r(4)*exp(p(4)*t); h=plot(t,ys);set(h,'linewidth',2),
echo off;
disp('题解4.9,4.10');pause;
echo on;
R1=randn(8,6),
mean(R1),
std(R1),
pause,
mean(R1(:)),
std(R1(:)),
pause,
R=ceil(16*rand(4,6)),
a=R(:,[1,2,3,4]),
inv(a),
echo off;
disp('题解4.11');
echo on;
t=[0:0.05:10];
x1=2.*cos(t)+3.*t;y1=2.*sin(t)+3;
plot(x1,y1),shg,hold on;
x2=3.*cos(t)+3.*t;y2=3.*sin(t)+3;
plot(x2,y2),shg
x3=4.*cos(t)+3.*t;y3=4.*sin(t)+3;
plot(x3,y3),shg