what's wrong with the symbolic solve function?

2 Ansichten (letzte 30 Tage)
Clive Mingham
Clive Mingham am 12 Jul. 2012
Kommentiert: Walter Roberson am 10 Jan. 2016
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 Kommentare
Ganesh P. Prajapat
Ganesh P. Prajapat am 10 Jan. 2016
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 am 10 Jan. 2016
Ganesh, which MATLAB version are you using? And how are you calling solve?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sean de Wolski
Sean de Wolski am 12 Jul. 2012
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