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.
Differences in SOLVE output between MATLAB version 2010b and 2012a
조회 수: 2 (최근 30일)
이전 댓글 표시
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
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 Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!