用matlab求解一元三次方程lear all;syms k rowl rowg sigma ug ul R m w;rowl=745.1143;rowg=34.7859;sigma=0.072;ug=7;ul=4;R=0.1;m=0.1*R;w=50;s=solve('0.5*k*m*rowg*rowl*(ug-ul)^2-(k*sigma-(rowl-rowg)*w^2*R/k)*(0.5*k*m*rowl+rowg)=0','k');s=simplify
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 00:30:27
用matlab求解一元三次方程lear all;syms k rowl rowg sigma ug ul R m w;rowl=745.1143;rowg=34.7859;sigma=0.072;ug=7;ul=4;R=0.1;m=0.1*R;w=50;s=solve('0.5*k*m*rowg*rowl*(ug-ul)^2-(k*sigma-(rowl-rowg)*w^2*R/k)*(0.5*k*m*rowl+rowg)=0','k');s=simplify
用matlab求解一元三次方程
lear all;
syms k rowl rowg sigma ug ul R m w;
rowl=745.1143;
rowg=34.7859;
sigma=0.072;
ug=7;
ul=4;
R=0.1;
m=0.1*R;
w=50;
s=solve('0.5*k*m*rowg*rowl*(ug-ul)^2-(k*sigma-(rowl-rowg)*w^2*R/k)*(0.5*k*m*rowl+rowg)=0','k');
s=simplify(s)
用matlab求解一元三次方程lear all;syms k rowl rowg sigma ug ul R m w;rowl=745.1143;rowg=34.7859;sigma=0.072;ug=7;ul=4;R=0.1;m=0.1*R;w=50;s=solve('0.5*k*m*rowg*rowl*(ug-ul)^2-(k*sigma-(rowl-rowg)*w^2*R/k)*(0.5*k*m*rowl+rowg)=0','k');s=simplify
因为你定义的就是符号运算啊 :“syms k rowl rowg sigma ug ul R m w;”这句就是定义了变量是符号变量,输出当然是符号,把这行去掉. 而且你用的simplify函数也是针对符号运算的.输出结果当然是符号. 接数字方程应该用ROOT函数,比如求x^3+2x^2+x-5=0 就是root([1 2 1 -5])