what's wrong with the symbolic solve function?

조회 수: 2 (최근 30일)
Clive Mingham
Clive Mingham 2012년 7월 12일
댓글: Walter Roberson 2016년 1월 10일
I'm using MATLAB Version 7.10.0.499 (R2010a) on a Macbook Pro with OS X version 10.6.8 and am getting some weird behaviour:
Sometimes the following syntax works:
>> syms h v
>> S=solve('U1=h','U2=h*v',h,v)
and sometimes it gives the error message:
??? Error using ==> mupadmex
Error in MuPAD command: Index exceeds matrix dimensions.
Error in ==> sym.sym>sym.subsref at 1366
B = mupadmex('mllib::subsref',A.s,inds{:});
Error in ==> solve>assignOutputs at 114
S.(char(symvars(j))) = R(:,j);
Error in ==> solve at 87
varargout = assignOutputs(nargout,R,symvars);
Any ideas on what is going wrong? I've also tried 'h,v' and 'h','v' with the same results.
  댓글 수: 2
Ganesh P. Prajapat
Ganesh P. Prajapat 2016년 1월 10일
The same problem is also with me. Could anybody help me out please? Even after running this error, if i am trying to find the eigen value of a simple 2x2 matrix, it fails .
Walter Roberson
Walter Roberson 2016년 1월 10일
Ganesh, which MATLAB version are you using? And how are you calling solve?

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 7월 12일
syms h v
S=solve('U1=h','U2=h*v',h,v)
Works fine for me on 10a. What other variables are in your workspace? What does which solve return?

태그

Community Treasure Hunt

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

Start Hunting!

Translated by