Matlab Code with Explanation:
x = -6:0.01:6 % time vector from -6 to 6 in steps of 0.01
fx = x.^4 - 3*x.^3 + 10*x.^2 - 2; % the equation of function f(x) where dot represents bit wise operation
plot(x, fx, 'k', 'linewidth', 2); % to plot f(x) with respect to x and 'k' is for black color and linewidth for thickness
grid on % turn on grids
xlabel('x') % to label the of x-axis
ylabel('f(x)') % to label the of y-axis
title('f(x)=x^4-3x^3+10x^2-2') % title of the plot
Output Results:
Please refer tot he attached image