From: Jon on 24 Sep 2009 16:02 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 24 Sep 2009 17:44 "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
|
Pages: 1 Prev: Error using aviread Next: Running R2009a Student version under x86_64 Linux |