'Solve' function getEqns input error

조회 수: 2 (최근 30일)
Anthony Naumenko
Anthony Naumenko 2013년 2월 11일
I'm trying to approximate using Matlab.
So I input
syms x;
solve ('1.05 = 1000*10^(-19)*[10^(14)/2+sqrt([10^(14)/2]^2+2*10^19*(x/300)^(3/2)*10^19*(x/300)^(3/2)*exp(-1.1/(0.0259*[x/300])))]*100', x);
and get
??? Error using ==> solve>getEqns at 202
' 1.05 = 1000*10^(-19)*[10^(14)/2+sqrt([10^(14)/2]^2+2*10^19*(x/300)^(3/2)*10^19*(x/300)^(3/2)*exp(-1.1/(0.0259*[x/300])))]*100 ' is not a valid expression or equation.
Error in ==> solve at 67
[eqns,vars] = getEqns(varargin{:});
By trial and error I found value of x to be 465 and when I use matlab to solve this equation,
1000*10^(-19)*[10^(14)/2+sqrt([10^(14)/2]^2+2*10^19*(456/300)^(3/2)*10^19*(456/300)^(3/2)*exp(-1.1/(0.0259*[456/300])))]*100
I get 1.0491 which is close enough to 1.05
Does 'solve' need special type of input?
Thanks for help

채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 11일
[] means indexing in MuPAD, but your [] expressions do not follow a variable name.
In MATLAB and MuPAD, the precedence operator always () never [] .

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Solvers에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by