From: Jon on
i am trying to truncate a coefficient of the solution to an ODE and none of the format commands seem to work. what is the best way to truncate this?

1.7990844817887342173466894269587 exp(-1.1666666666666666666666666666667 t)

sin(16.082253849783894295041306887877 t) +

0.80000000000000000000000000000000

exp(-1.1666666666666666666666666666667 t)

cos(16.082253849783894295041306887877 t)



Thanks,
From: Steven Lord on

"Jon " <jonathan_mclaughlin(a)student.uml.edu> wrote in message
news:h9gj8c$5t1$1(a)fred.mathworks.com...
>i am trying to truncate a coefficient of the solution to an ODE and none of
>the format commands seem to work. what is the best way to truncate this?
>
> 1.7990844817887342173466894269587 exp(-1.1666666666666666666666666666667
> t)
>
> sin(16.082253849783894295041306887877 t) +
>
> 0.80000000000000000000000000000000
>
> exp(-1.1666666666666666666666666666667 t)
>
> cos(16.082253849783894295041306887877 t)

Since I'm pretty sure t in this expression is a sym object (from the way the
expression is displayed), use VPA. Alternately if you want to evaluate this
for a given value of t, use SUBS (potentially in combination with DOUBLE.)

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ