Unfortunately gampdf is only defined for numeric x; it is not part of the Symbolic toolbox.
The Symbolic Toolbox does have a symbolic equivalent, but it does not have a nice interface to it. Seehttps://www.mathworks.com/help/symbolic/mupad_ref/stats-gammapdf.html and notice this is MuPAD, so to get at it from MATLAB you would need to use feval(symengine) or evalin(symengine)
Best Answer