Question

Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in...

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?

Homework Answers

Answer #1

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.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using Matlab, solve the following ODE using Euler's method... I have to perform solve the ODE...
Using Matlab, solve the following ODE using Euler's method... I have to perform solve the ODE with both step sizes and plot both on the same graph. y'=1/y, Initial Condition y(0)=1. step size = 0.1 and 0.01 The interval is from 0 to 1. UPDATE: I actually figured it out myself! THANKS
Using Matlab to solve the problem below Given X=[-2 -1 0 1 2] Y=[1.5 3.2 4.5...
Using Matlab to solve the problem below Given X=[-2 -1 0 1 2] Y=[1.5 3.2 4.5 3.4 2] a). Plot a scatter plot of the data b). Determine the coefficients of the polynomial ?0 + ?1? + ?2?2 which best fits the data c). Plot this function on the same plot as in part ‘a’. USE MATLAB CODE ONLY! USE MATLAB CODE ONLY! THANK YOU
Matlab Create plot of the following density functions using x values between -10 and 10 with...
Matlab Create plot of the following density functions using x values between -10 and 10 with an increment of 0.02 -Normal cumulative distribution function with mu=1, sigma=1, mu=0, sigma=2, mu=0,sigma=1/2
Fourier Series Approximation Matlab HW1:     You are given a finite function xt={-1 0≤t≤5; 1 5<t≤10...
Fourier Series Approximation Matlab HW1:     You are given a finite function xt={-1 0≤t≤5; 1 5<t≤10 .            Hand calculate the FS coefficients of x(t) by assuming half- range expansion, for each case below. Modify the code below to approximate x(t) by cosine series only (This is even-half range expansion). Modify the below code and plot the approximation showing its steps changing by included number of FS terms in the approximation. Modify the code below to approximate x(t) by sine...
Using for loop and if statement, write a MATLAB code to plot a graph for x(t)...
Using for loop and if statement, write a MATLAB code to plot a graph for x(t) as a function of time t in the range 0 to 12 in increment of 0.01 ?(?) = 1: 0 ≤ ? ≤ 1 2? − 1 1 ≤ ? ≤ 2 3 2 ≤ ? ≤ 3 −2.5? + 10.5 3 ≤ ? ≤ 5 −2 5 ≤ ? ≤ 6 4/3 ? − 10 6 ≤ ? ≤ 9 2 9 ≤...
Write code to evaluate the polynomial at the point indicated by using Horner’s algorithm. p(x)=x^5−x^4−3x^3−5x^2+10 at...
Write code to evaluate the polynomial at the point indicated by using Horner’s algorithm. p(x)=x^5−x^4−3x^3−5x^2+10 at x=2 (use MATLAB to code and show the results.)
This is the code I am working on for a project using MATLAB: clc,clear G=27.7*10.^9; b=0.286*10.^-9;...
This is the code I am working on for a project using MATLAB: clc,clear G=27.7*10.^9; b=0.286*10.^-9; v=0.334; x=(-5*10.^-9:0.1:5*10.^-9); y=(-5*10.^-9:0.1:-1*10.^-9); [xx,yy]=meshgrid(x,y); stress=(-G*b)*yy*(3^xx+yy^2)/(2*pi.*(1-v))*(xx^2+yy^2).^2; figure mesh(xx,yy,stress); grid on xlabel('X') ylabel('Y') zlabel('Stress') Whenever I try to run this I keep getting the "Error using mesh" line, and then an error for "mesh(xx,yy,stress)". I know I am not catching the issue but how do I fix this? If you could explain as well that be extremely helpful!
Using Matlab, Many rides at amusement parks require riders to be a certain minimum height. Assume...
Using Matlab, Many rides at amusement parks require riders to be a certain minimum height. Assume that the minimum height is 120 cm for a certain ride. Write a Matlab function to determine whether the rider is tall enough. When the function is called, it should display one of the following information to the command window. (i) Sorry, you are not tall enough. (ii) Height check successful Please include a copiable Matlab function code and the associated screenshots.
Use MATLAB to find the best a, b, and c coefficients for curve y=a*(sqrt(x)/x)+bx+c to fit...
Use MATLAB to find the best a, b, and c coefficients for curve y=a*(sqrt(x)/x)+bx+c to fit these data points: (x,y)=[(0.1 2.5) (1.2 1.64) (2.1 1.67) (3.35 1.81) (4.5 1.9)] Use fprintf to show the a,b,c values you obtained, also plot the points and fitted curve in one plot (use proper labels.)
Write a MATLAB function that implements the difference equation for the system assuming null initial conditions....
Write a MATLAB function that implements the difference equation for the system assuming null initial conditions. Include source code . y(n) = x(n) + 2x(n-1) + x(n-2) + 0.8 y(n-1) - 0.64 y(n-2) Use Matlab to calculate the response of the system to p(n) = 0 for all n expect when p(10) = 1. Using stem, plot the resulting output to n=100 What is the amplitude of the output squence? Was the signal amplified? How much?