Differences in SOLVE output between MATLAB version 2010b and 2012a

조회 수: 2 (최근 30일)
Daniel
Daniel 2012년 6월 11일
Dear Users
The title says it all really. I am using SOLVE to solve a system of 12 equations with 12 unknown variables. My unknowns are declared as;
z11=sym('z11','real')
z12=sym('z12','real')
z21=sym('z21','real')
z22=sym('z22','real')
sig1=sym('sig1','positive')
sig2=sym('sig2','positive')
sigu1=sym('sigu1','positive')
sigu2=sym('sigu2','positive')
sig1_h=sym('sig1_h','positive')
sig2_h=sym('sig2_h','positive')
sigu1_h=sym('sigu1_h','positive')
sigu2_h=sym('sigu2_h','positive')
I am using SOLVE as follows
S = solve('sigu1*(1+z11*z11) + sig1 = sigu1_h*(1+z11*z11) + sig1_h',...
'sigu1*(1+z12*z12) + sig1 = sigu1_h*(1+z12*z12) + sig1_h',...
'sigu1*(1+z12*z11) = sigu1_h*(1+z12*z11)',...
'sigu2*(1+z11*z11) + sig2 = sigu2_h*(1+z11*z11) + sig2_h',...
'sigu2*(1+z12*z12) + sig2 = sigu2_h*(1+z12*z12) + sig2_h',...
'sigu2*(1+z12*z11) = sigu2_h*(1+z12*z11)',...
'sigu1*(1+z21*z21) + sig1 = sigu1_h*(1+z21*z21) + sig1_h',...
'sigu1*(1+z22*z22) + sig1 = sigu1_h*(1+z22*z22) + sig1_h',...
'sigu1*(1+z22*z21) = sigu1_h*(1+z22*z21)',...
'sigu2*(1+z21*z21) + sig2 = sigu2_h*(1+z21*z21) + sig2_h',...
'sigu2*(1+z22*z22) + sig2 = sigu2_h*(1+z22*z22) + sig2_h',...
'sigu2*(1+z22*z21) = sigu2_h*(1+z22*z21)')
This system always has a solution when sig1=sig1_h, sig2=sig2_h, sigu1=sigu1_h, sigu2=sigu2_h, regardless of what z11, z12, z21 and z22 are set to (although I am not really interested in this particular solution).
In MATLAb version 2010b there are 17 solutions (including the one described above), but in Matlab 2012a I get the warning that no explicit solutions can be found. I noticed in the 2012a documentation that sometimes the "==" symbol is used instead of "=". However changing my code to use this makes no difference. I cannot see any other reasons why I need to change my code for 2012a.
Does anybody have any thoughts as to why 2012a is not giving me the same results, and/or how to get it to give me the correct results if I am using it incorrectly?
Any help would be greatly appreciated.
For information I am running both MATLAB versions concurrently on a 32-bit Windows Vista machine.
  댓글 수: 2
Daniel
Daniel 2012년 6월 12일
I have been informed this is a bug in version 2012. I will keep everybody posted on progress regarding fixing it, or perhaps a workaround.
Salvador C. Cardona Navarrete
Salvador C. Cardona Navarrete 2014년 11월 22일
편집: Salvador C. Cardona Navarrete 2014년 11월 22일
Hello Daniel:
I have detected some similar bug between Matlab 2010b and Matlab 2013b. Do you know if Mathworks solved the bug you detected?.
Salva

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by