plot the polynomial y=18𝑥^3 − 5𝑥^2− 2𝑥 +3 over the range −7 ≤ x ≤ 1. in matlab
main.m
% Define the polynomial functiony = @(x) 18*x.^3 - 5*x.^2 - 2*x + 3;
% Define the range of x valuesx = -7:0.1:1;
% Calculate the corresponding y valuesy_values = y(x);
% Plot the polynomialplot(x, y_values);
xlabel('x');
ylabel('y');
title('Plot of polynomial y = 18x^3 - 5x^2 - 2x + 3');