b=input('b的数值= ');c=input('c的数值= ');A=input('夹角A的度数=');asq=b.^2+c.^2-2*b*c*cos(A);fprintf('a的数值= %f\n',sqrt(asq));
就用余弦函数就行了clearx=0:pi/20:2*pi;y=cos(x);plot(x,y)