how to use mod() with symbolic numbers?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Is this possible to do in MatLab?
for mod(a,b) == 3, find possible values of a and b
syms a b integer positive
assumeAlso((1 <= a) & (a <= 10));
assumeAlso((1 <= b) & (b <= 10));
e1 = mod(a,b) == 3;
sol = solve([e1], [a, b]);
aSol = sol.a;
bSol = sol.b;
Matlab gives an error..
Error using symengine
Invalid second argument.
Error in sym/privBinaryOp (line 1022)
Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});
Error in sym/mod (line 18)
C = privBinaryOp(A, B, 'symobj::zipWithImplicitExpansion', 'symobj::modp');
Error in simple_easter (line 5)
e1 = mod(a,b) == 3;
My actual problem is much more complex, but this is a simple example which demonstrates the error
Thanks
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!