```Date: Feb 28, 2013 7:36 AM
Author: Christopher Creutzig
Subject: Re: There are a way of instruct the matlab to use sin(pi) = 0 in<br> the symbolic computations?

On 28.01.13 17:48, Fernando wrote:> I think that I can't do it. My equations system is:> >  sin(2*q1)*i)/2 == 0> -(sin(2*q1)*i)/2 == 0> > Then, pi is not in my equation, it must be "tested" as solution internally by Matlab, however, the matlab does not recognize pi as solution. I think that I need a way of instruct the matlab to internally use sin(pi) = 0 in the symbolic computations when solve the equations system. Internally, it does find this solution along with all the otherinfinitely many ones, as you can see, e.g., by using the MuPAD NotebookInterface or by calling the MuPAD solve function via feval:>> syms q1>> pretty(feval(symengine, 'solve', sin(q1)==0))  +-  -+    { +-    -+ |         }  | q1 | in { | pi k | | k in Z_ }  +-  -+    { +-    -+ |         }>> pretty(feval(symengine, 'solve', sin(q1)==0, q1))  {pi k | k in Z_}Now, such an infinite solution set is not easy to use in MATLAB code.For that reason, the MATLAB command SOLVE generally tries to extract a(hopefully representative) finite subset of solutions for the input. Ifyou have special requirements on this set, it may be worth trying totell the system something about your variables:>> assume(q1 > 0)>> solve(sin(q1)==0)ans =2*pior even>> assume(q1 > 0), assumeAlso(q1 < 4)>> solve(sin(q1)==0)ans =piNote that the MATLAB function SOLVE does a few additional things on yourinput, too, so there is no easy drop-in replacement that directly callsthe MuPAD command, even if your code can handle the output. But if youthink that getting the complete solution set is something the SymbolicMath Toolbox should really offer, by all means let MathWorks' techsupport know.HTH,	Christopher
```