Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: There are a way of instruct the matlab to use sin(pi) = 0 in the symbolic computations?
Replies: 1   Last Post: Jan 28, 2013 11:04 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: There are a way of instruct the matlab to use sin(pi) = 0 in the symbolic computations?
Posted: Jan 28, 2013 11:04 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Fernando " <fernandovm@gmail.com> wrote in message
news:ke63gc$c5r$1@newscl01ah.mathworks.com...
> Hi,
>
> I have the equations system eqs = [(sin(2*q1)*i)/2; -(sin(2*q1)*i)/2]
> and when I do solve(eqs == 0) I get zero as unique solution, I know that,
> due to limited precision, is correct the matlab does not to make sin(pi) =
> 0. But, would be very usefull to me if I could make some symbolic
> computations using sin(pi) = 0, and equally cos(pi/2) = 0. There are a way
> of instruct the matlab to use both sin(pi) and cos(pi/2) equal to zero in
> the symbolic computations?


Make it symbolic.

spi = sym(pi);
sin(spi)
cos(spi/2)

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.