Azzera filtri
Azzera filtri

what's wrong with the symbolic solve function?

3 visualizzazioni (ultimi 30 giorni)
Clive Mingham
Clive Mingham il 12 Lug 2012
Commentato: Walter Roberson il 10 Gen 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 Commenti
Ganesh P. Prajapat
Ganesh P. Prajapat il 10 Gen 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 il 10 Gen 2016
Ganesh, which MATLAB version are you using? And how are you calling solve?

Accedi per commentare.

Risposte (1)

Sean de Wolski
Sean de Wolski il 12 Lug 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