I need help factoring a symbolic expression

I have a symbolic expression in 3 variables f(r,z,t). I am trying to factor it such that I have an expression of the form:
f(r,z,t)=g(t)*h(r,z)
I am using R2014a fyi. I think this can be done with factor(f,t) if I had R2016 but is there a nice way to do this with R2014.
Thanks
Drew

Answers (1)

factor() has always been part of the Symbolic Toolbox.

4 Comments

When I attempt to use factor(f,t) it tells me there are too many input arguments. f is a scalar equation of r z t
Does the example from the documentation work?
syms x y
F = factor(y^2*x^2,x)
what do you see for
which -all factor
Also, is it possible that instead of the Mathworks Symbolics Toolbox, that you have Maple installed and are using the symbolic facilities from it?
I'm trying to figure this out as well. I see
C:\Program Files\MATLAB\R2020a\toolbox\matlab\specfun\factor.m
C:\Program Files\MATLAB\R2020a\toolbox\shared\hdlshared\@hdl\factor.p % hdl method
C:\Program Files\MATLAB\R2020a\toolbox\symbolic\symbolic\@sym\factor.m % sym method
when typing
which -all factor
It keeps defaulting to the first function when I'm trying to call the third. How do I get around this?

Sign in to comment.

Asked:

on 9 Mar 2016

Commented:

on 19 Dec 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!