mupad out of memory error

2 views (last 30 days)
linda
linda on 24 Feb 2012
I have the following function written in Matlab:
function [Q,B]=gsolve(A,Sc,Sq)
d=size(A); n=d(1); N=d(2);
syms x1 x2 x3 x4 x5 x6 x7 x8 x9 positive
x=[x1 x2 x3 x4 x5 x6 x7 x8 x9];
x=x(1:n);
c=1; I=[];
for i=1:n
if bitget(Sq,i), x(i)=1;
elseif bitget(Sc,i), x(i)=0;
else I=[I,i];
end
c=c*(1-x(i));
end
B=[];
for i=I
y1=x; y1(i)=1; y1=mgame(y1);
y0=x; y0(i)=0; y0=mgame(y0);
B=[B;(1-c/(1-x(i)))*A(i,:)*y1'-A(i,:)*y0'];
end
Q=solve(B);
The input for this function is the matrix
A =
0 0 1 0 1 1 0
0 0 1 0 1 1 0
0 0 1 0 1 1 0
Now when I perform the command:
gsolve(A,0,0)
I get the following warning:
Warning: Could not extract individual solutions. Returning a MuPAD set object. > In solve>assignOutputs at 123 In solve at 97 In gsolve at 23
ans =
Warning: The result cannot be displayed due a previously interrupted computation or out of memory. Run 'reset(symengine)' and rerun the commands to regenerate the result. > In sym.disp at 22 In sym.display at 17
While my teacher does get a solution to this problem. How can I force Matlab to calculate values for x1 x2 and x3 by using the symbolic math toolbox? I have version 2011a from Matlab and my teacher uses version 2010a, but does that make such a big difference?

Answers (0)

Community Treasure Hunt

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

Start Hunting!