Answer:
x = [-10:0.01:100];
y = 6sin(x) + cos(4*x) - 0.3;
plot(x, y)
xlabel('x');
ylabel('y');
title('Plot of the Trig Function');
Note: the function was not properly specified in the question, so a sample function y = 6sin(x) + cos(4*x) - 0.3 was used
Explanation:
The following steps should be taking to plot the graph of a function −
1. Define the independent variable range of values
for example: x = [-10:.01:100]; defines x starting from -10 to 100 with a step of 0.01
2. Define your dependent function, y = f(x)
for example: y = 6sin(x) + cos(4*x) - 0.3;
3. Call the matlab plot function plot(x, y)
4. Additionally, you can define the title, legends, axis labels, etc.
xlabel('x');
ylabel('y');
title('Plot of the Trig Function');
legend('y = 6sin(x) + cos(4*x) - 0.3');