Borrar filtros
Borrar filtros

what's wrong with the symbolic solve function?

1 visualización (últimos 30 días)
Clive Mingham
Clive Mingham el 12 de Jul. de 2012
Comentada: Walter Roberson el 10 de En. de 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 comentarios
Ganesh P. Prajapat
Ganesh P. Prajapat el 10 de En. de 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 el 10 de En. de 2016
Ganesh, which MATLAB version are you using? And how are you calling solve?

Iniciar sesión para comentar.

Respuestas (1)

Sean de Wolski
Sean de Wolski el 12 de Jul. de 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?

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by