It is quite often required to plot a function like ” Gaussian distribution, a*exp(-(x-b)^2/2c) or f=x^2″
MATLAB has the function to plot and manipulate symbolic equations in a easy way.
For example, if I want to plot y=x^2+3.
syms x; f='x^2+3'; ezplot(f,[-10,10,-5,50]);
If you face this error “Single input must be an existing figure handle or a scalar integerfrom 1 to 2147483646″, please check the definition function.
f=x^2+3 and f=’x^2+3′ are different.
Give a try to define your own function and plot it.