The Symbolic Math toolbox math toolbox has changed a lot (for the better) over the years. You might not have sym/linsolve
, but does this work?:
s = mod(sym(A)\sym(b),8)
That will basically do the same thing. sym/linsolve
just does some extra input checking and and rank calculation to mirror the capabilities of linsolve
.
You're using solve
correctly for current versions, but it looks like R2010b may not understand the ==
operator (sym/eq
) in this context. You can use the old string format to specify your equations:
eqs = {'5*y + 4*z + q = 2946321',...
'x + 7*y + 2*q = 5851213',...
'8*x + y + 2*q = 2563617',...
'10*x + 5*y + z = 10670279'};
vars = {'x','y','z','q'};
[x,y,z,q] = solve(eqs{:},vars{:})