
- #MATLAB SYMBOLIC TOOLBOX NOT CANCELING TERMS CODE#
- #MATLAB SYMBOLIC TOOLBOX NOT CANCELING TERMS FREE#
= coeffs(eq( i),x) % separate equation into coefficients and powers of x(1).x(n) for k = 1: numel(p) % loop through found powers/coefficients for j = 1:m % loop through x(1). function = equationsToMatrix ( eq, x ) %EQUATIONSTOMATRIX equationsToMatrix for nonlinear equations % factors out the vector x from eq such that eq = Ax + b % eq does not need to be linear in x % eq must be a vector of equations, and x must be a vector of symbolsĪssert(isa(eq, 'sym'), 'Equations must be symbolic')Īssert(isa(x, 'sym'), 'Vector x must be symbolic') Could you help me simplify this function syms a si f(si) (a2(51056921947406336exp(-si2i) + 51056921947406336exp(si2i) +.
#MATLAB SYMBOLIC TOOLBOX NOT CANCELING TERMS CODE#
The code I am using is symbols expand (symbols) symbols simplify (symbols, 'Steps', 100) Is there any way to cancel the factor of 4 in both the. Here is the code: pkg load symbolic only for. I'm trying to use the symbolic simplify function, but I'm not getting the output that I would like.

#MATLAB SYMBOLIC TOOLBOX NOT CANCELING TERMS FREE#
Feel free to rename it so it doesn't conflict with the MATLAB builtin. For the code I replaced the function with so terms could cancel out as by hand, since they did not with. It works exactly as I suggested in my original question. This function works, but it is not heavily tested.

Posting my own solution so there can be at least one answer. Spherical symmetry necessitates the existence of magnetic monopoles, which do not affect the coupled MaxwellDirac system due to magnetic terms cancelling.
