24小时热门版块排行榜    

查看: 1042  |  回复: 2

loselsj

金虫 (初入文坛)

[求助] matlab solve命令出错 已有1人参与

在matlab中出现问题,不知道问题在哪
syms omega
S=solve('a^2=omega^2/(5.607*10^8)',...
    '2*q^2=-a^2*(alpha+beta)+sqrt(a^4*(alpha-beta)^2+4*gamma*a^2)',...
    'a^2=2*(1+cos(p)*cosh(q))/((alpha+beta)*sin(p)/p*sinh(q)/q-(alpha-beta)^2)*cos(p)*cosh(q)',...
    '2*p^2=a^2*(alpha+beta)+sqrt(a^4*(alpha-beta)^2+4*gamma*a^2)',...
    'alpha=242.97','gamma=2496','beta=7800');
S=[S.omega];
??? Error using ==> solve>getEqns at 182
' 2*q^2=-a^2*(alpha+beta)+sqrt(a^4*(alpha-beta)^2+4*gamma*a^2) ' is not a valid expression or
equation.

Error in ==> solve at 67
[eqns,vars] = getEqns(varargin{:});
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zaq123321

专家顾问 (著名写手)

【答案】应助回帖

感谢参与,应助指数 +1
I believe your grammar has problem.  See
syms x
s = solve(x^4 + x^3 + 1 == 0, x)
from
http://www.mathworks.com/help/symbolic/solve.html

Please try some simple examples and then try your complex equation system.
小木虫给我温暖,给我希望,爱就要爱小木虫。
2楼2014-11-18 03:39:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

loselsj

金虫 (初入文坛)

引用回帖:
2楼: Originally posted by zaq123321 at 2014-11-18 03:39:34
I believe your grammar has problem.  See
syms x
s = solve(x^4 + x^3 + 1 == 0, x)
from
http://www.mathworks.com/help/symbolic/solve.html

Please try some simple examples and then try your compl ...

Solve the system of equations:
syms x;
S = solve('x + y  = 1','x - 11*y = 5');
S = [S.x S.y]


The result is:
S =
[ 4/3, -1/3]

from help solve
3楼2014-11-18 09:27:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 loselsj 的主题更新
信息提示
请填处理意见