Files
matlab-learning/a2_6.m

16 lines
214 B
Matlab

% 学号24110901003
% a=3,b=1,c=9;
a=3;
b=1;
c=9;
% 定义x
syms x
% 方程表达式
f=a*x^2+b*x+c;
% 用solve函数来解
solve(f==0)
% 输出如下
% ans =
%
% - (107^(1/2)*1i)/6 - 1/6
% (107^(1/2)*1i)/6 - 1/6