9:57 AM

the symbol 'pi'

             If we execute sin (pi) we should get zero as the answer,however the value of sin(pi) when executed in matlab shows a value of 1.2246e-016.The reason is that pi here is not the irrational number rather an approximate value of    3.141592653589793.

             Hence in order to use the irrational value of pi we have to execute it as a symbol.
sin(sym('pi'))
                     This gives a value of zero.This is so because pi here is treated as a symbol which has the irrational value.It should be written as sym('pi').
              
PLEASE LEAVE A COMMENT :)

0 comments:

Post a Comment