Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in the range of -1 to 1 in step sizes of 0.1.
Hence, plot y versus x.
Could you also include the Matlab code and the associated screenshots?
Here is the MATLAB code for the given question:
x = -1:0.1:1; %x values
y = (x + 10).*(x.^5 + 1); % y expression
plot(x,y); % plotting the values
xlim([-1.2 1.2]); % set the axis
xlabel("x"); % name the x-axis
ylabel("y"); % name the y=axis
title("Plot of Y vs X"); % title for the plot
Duing this code we use dot product .* as we give the input x as vector with values from -1 to 1.
Hope you got the answer. If you still have any doubts regading this, please try to comment, I will help you.
Get Answers For Free
Most questions answered within 1 hours.