第三题>> syms a b c x
>> f = a*x^2+b*x+c
f =
a*x^2 + b*x + c
>> solve(f)
ans =
-(b + (b^2 - 4*a*c)^(1/2))/(2*a)
-(b - (b^2 - 4*a*c)^(1/2))/(2*a)第五题
>> clear;
>> x = 0:20;
>> y = sin(x)+sqrt(x);
>> p = polyfit(x,y,5);
>> subplot(1,2,1)
>> plot(x,y,'b*')
>> subplot(1,2,2)
>> plot(x,polyval(p,x),'r')