Jay - are you observing an error? If so, what is it?
Or do not use the syms x and just call
ezplot(@(x) -3*x^3+5*x ,[-2.5, 2.5])
You may see some warnings such as
Warning: Function failed to evaluate on array inputs; vectorizing the function may speed up
its evaluation and avoid the need to loop over array elements.
and so you can just do the following instead
ezplot(@(x) -3*x.^3+5*x ,[-2.5, 2.5])
where the anonymous function has been vectorized.