matlab解方程老出现is not a valid expression or equation.
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/18 04:12:23
matlab解方程老出现is not a valid expression or equation.
clear;clc;clf;
syms x K R L D T Iref E a tao;
K=0.3;R=10;L=12e-3;D=0.4;Iref=5;T=1e-4;E=350;
a=E/R;tao=L/R;
x=solve('(x-a)*exp(-T/tao)+2*a*exp((-T/tao)*(1-D-K*(Iref-x)))-a-x=0','x')
出现错误
Error using ==> solve>getEqns at 182
' (x-a)*exp(-T/tao)+2*a*exp((-T/tao)*(1-D-K*(Iref-x)))-a-x=0 ' is not a valid expression or equation.
clear;clc;clf;
syms x K R L D T Iref E a tao;
K=0.3;R=10;L=12e-3;D=0.4;Iref=5;T=1e-4;E=350;
a=E/R;tao=L/R;
x=solve('(x-a)*exp(-T/tao)+2*a*exp((-T/tao)*(1-D-K*(Iref-x)))-a-x=0','x')
出现错误
Error using ==> solve>getEqns at 182
' (x-a)*exp(-T/tao)+2*a*exp((-T/tao)*(1-D-K*(Iref-x)))-a-x=0 ' is not a valid expression or equation.
你可能用的matlab版本比较新, 尽量用符号变量, 避免用字符串:syms x
K=0.3;R=10;L=12e-3;D=0.4;Iref=5;T=1e-4;E=350;
a=E/R;tao=L/R;
x=solve((x-a)*exp(-T/tao)+2*a*exp((-T/tao)*(1-D-K*(Iref-x)))-a-x,x) % 这一行输出x
subs(x) % x的数值结果.输出为:
x = -86471113102594225/102882269851877+40*lambertw(2251799813685248/102882269851877*exp(10847469989018732/514411349259385)) ans = 4.42205395667386
K=0.3;R=10;L=12e-3;D=0.4;Iref=5;T=1e-4;E=350;
a=E/R;tao=L/R;
x=solve((x-a)*exp(-T/tao)+2*a*exp((-T/tao)*(1-D-K*(Iref-x)))-a-x,x) % 这一行输出x
subs(x) % x的数值结果.输出为:
x = -86471113102594225/102882269851877+40*lambertw(2251799813685248/102882269851877*exp(10847469989018732/514411349259385)) ans = 4.42205395667386
matlab解方程老出现is not a valid expression or equation.
matlab求解方程的时候出现 is not a valid expression or equation.
Matlab解方程时提示错误“**is not a valid expression or equation.”
Matlab解方程组时 提示错误' is not a valid expression or equation.下面的程
matlab 数值解法老是提示出is not a valid expression or equation.
The expression to the left of the equals sign is not a valid
is not a valid date and time
请问:" is not a valid date
XXX is not a valid integer value
this is not a valid serial number?
Full name is NOT a valid
"0.0 ' is not a valid timestamp