Search All of the Math Forum:

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

Topic: Eval and long format answer
Replies: 3   Last Post: Nov 30, 2012 1:16 PM

 Messages: [ Previous | Next ]
 Steven Lord Posts: 17,533 Registered: 12/7/04
Re: Eval and long format answer
Posted: Nov 30, 2012 1:16 PM

"Nasser M. Abbasi" <nma@12000.org> wrote in message
news:k9apgr\$n9d\$1@speranza.aioe.org...
> On 11/30/2012 11:09 AM, Nasser M. Abbasi wrote:
>> On 11/30/2012 10:48 AM, Genevieve Masson wrote:
>>> Hi :)
>>>
>>> How to avoid that type of answer (i mean how to evaluate the fractions)
>>> :
>>>

>>>>> Vg2
>>>
>>> Vg2 =
>>>
>>> acos(5784835530832562/5514948135819145 -
>>> (18014398509481984*((3937*sin(thCerc))/20000 - AE*sin(alpha))^2)
>>>

>>
>
>> First you need numbers for those symbols you have there: thCerc,AE,alpha
>> etc...
>> use subs().
>> Then you should be able to just use double() around the whole thing.
>>

>
> Also, you can try simplify on the symbolic expression. It helped
>
> EDU>> syms thCerc AE alpha
> EDU>> VG2=... what you had above...
> EDU>> simplify(VG2)
> acos(12389/11811 - (17592186044416*(3937*sin(thCerc) -
> 20000*AE*sin(alpha))^2)/390625)

If you just want to display approximations to the numeric values without
substituting in for the symbolic variables, use VPA.

--
Steve Lord
slord@mathworks.com