Extract solutions solve error
Mostra commenti meno recenti
I cannot figure out how to solve this warning error.
Warning: Could not extract individual solutions. Returning a MuPAD set object. > In solve>assignOutputs at 104 In solve at 87 In DOF_6 at 54
I've looked online and found someone else with the same error http://www.mathworks.com/matlabcentral/answers/927-help-using-solve-function-with-inputting-a-known-variable but it seems that his problem is different than mine.
I will post my entire code, but as you will notice, i have tried to break the problem into chunks but even then the warning pops up. any help would be greatly appreciated.
SR = [16.9175 12.502 15.8187 12.9719];
SR_ = [12.5399 16.8893 13.8293 15.0748];
Base = [4 4 2 2];
Base_ = [4 4 2 2];
syms A B C X Y Z positive;
syms SW SH SL positive; % positive only variables
syms az phi rho; % positive or negative variables
%%equations
% 3 equations for SH, SL, SW
Eq(1) = SR_(3)^2 - (SH - Base_(3))^2 - (SR_(4)^2 - (SH + Base_(4))^2);
Eq(2) = SR_(1)^2 - SH^2 - (SW^2 + (SL - Base_(1))^2);
Eq(3) = SR_(2)^2 - SH^2 - (SW^2 + (SL + Base_(2))^2);
% 6 equations for X,Y,Z, A,B,C
Eq(4) = SR(1)^2 - (SH + Z)^2 - ((SW + X)^2 + (SL + Y)^2);
Eq(5) = SR(2)^2 - (SH - Z)^2 - ((SW - X)^2 + (SL - Y)^2);
Eq(6) = SR(3)^2 - (SH + C)^2 - ((SW + A)^2 + (SL + B)^2);
Eq(7) = SR(4)^2 - (SH - C)^2 - ((SW - A)^2 + (SL - B)^2);
Eq(8) = SR(4)^2 - (SL - B)^2 - ((SW - A)^2 + (SH - C)^2);
Eq(9) = SR(1)^2 - (SL + Y)^2 - ((SW + X)^2 + (SH + Z)^2);
% 3 equations for az, phi, rho
Eq(10) = 'phi - (acos(C/Base(4)))';
Eq(11) = 'az - acos(A/(Base(4)*sin(phi)))';
Eq(12) = 'rho - asin(Z/(Base(1)*sin(phi)))';
%%solve
%S = solve(Eq(1),Eq(2),Eq(3), SW, SL, SH); %this works fine
% this one has the warning
S = solve(Eq(1), Eq(2), Eq(3), Eq(4), Eq(5), Eq(6),...
Eq(7), Eq(8), Eq(9), SW, SL, SH, X, Y, Z, A, B, C);
%this one has the warning also
%S = solve(Eq(1), Eq(2), Eq(3), Eq(4), Eq(5), Eq(6),...
% Eq(7), Eq(8), Eq(9), Eq(10), Eq(11), Eq(12),...
% SW, SL, SH, X, Y, Z, A, B, C, az, phi, rho);
thanks, darren
EDIT: i have fixed the name of B so that it is not over defined
Risposta accettata
Più risposte (1)
Andrew Newell
il 26 Apr 2011
0 voti
You have a variable B that starts out as a vector with numerical values and then becomes a variable.
Categorie
Scopri di più su Utilities for the Solver in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!