help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing output mode of symbolic octave


From: Mike Miller
Subject: Re: changing output mode of symbolic octave
Date: Tue, 4 Aug 2015 12:31:42 -0400

On Tue, Aug 4, 2015 at 04:20:22 -0700, Leo07nard wrote:
> e = (sym)
>
>   56*x   5*y
>   ---- + ---
>    3      3
>
>>>  musf=function_handle(e)
> musf =
>
> @(x, y) 56 .* x ./ 3 + 5 .* y ./ 3
>
> there is still no real output. Octave cannot automatically divide 56/3 ? (in
> this example)

Looks like you want vpa. Sym objects prefer rational formatting, vpa
converts them to floating point. For example:

  >> syms x
  >> f = 0.25 * x
  f = (sym)
    x
    ─
    4
  >> vpa(f)
  ans = (sym) 0.25⋅x

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]