solution
//output
//copyable code
program
%matlab code
%plot the range
x=-10:.2:10;
y=-20:.2:20;
%read matrices x and y value
[X,Y] = meshgrid(x,y);
%plot the surface function
Z = X.^2-2*(X.*Y)+3*Y.^2;
figure
%surface plot
surface(X,Y,Z)
%view figure
view(3)
In Matlab Prepare a script to plot the surface plot of the function Plot over the...
Write a MATLAB script to plot the function of f(x) given by:
Write a MATLAB script to plot the function of f(x) given by: f(x) = integral x^2 - pi^2/4 x > pi/2 8 * cos x -pi/2 lessthanorequalto x lessthanorequalto pi/2 pi^2/4 - x^2 x < -pi/2
Develop a MATLAB script (M-File) to plot the function: y(x)-2l0g(10x) for the range of 0 sxs 10.
Please I need help with MATLAB .. PLease help me . Thankyou Write Matlab code to plot a 2D sinc function over a 2D cartesian grid where x ranges from 100 to 355 and y ranges from 0 to 255 and the sinc is centered at somewhere not midway in the grid. First plot the grid, and then plot the function on the grid (both as grayscale and as a surface plot). Comment the code well, generate the figures and...
MATLAB Question: Write a script for the problem pictured. Please
send the script, not just the printout. Make sure your script
allows you to input a value for n
so when prompted, in the command window, user types n value. The
n value should be the f_k if k ==1 .... Please also send print outs
if you can.
BELOW IS A SAMPLE ANSWER THAT DID NOT PUT THE INPUT SCRIPT
NEEDED FOR THIS QUESTION TO BE CORRECT. YOU CAN...
Please show the code necessary, and explanations on MATLAB.
Plotting 11) Plot the function y = sin(x) from x = 0 to 21. 12) Plot the functions y = x2 z = x2 + 2x + 1 from x = 0 to 2 on the same graph. Scripts: Input and Output 13) Write a script (M-file) to read in a message at the command line using the MATLAB input function and then display the message to the Command Window using...
Please use matlab for the following problem
I. For the function. /(x) -X-4X+2XY+2Y+2Y+14 a. Plot the surface function for X over [5 6]. and Y over [-4, -2]. ecolour plot for X over [O 101 and Yover [43] and values for the contours of V [1 1.25 1.5 22.5 3] c. Write an m-file to find the minimum of the function using the gradient descent method Use a starting value of [4, -4].
I. For the function. /(x) -X-4X+2XY+2Y+2Y+14 a....
Create a surface plot and a contour plot of the function z=(x-2)^2+2xy+y^2. Using the matlab
MATLAB SCRIPT PLEASE
Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each plot should have its own figure associated with it. In all questions, give the figure a title, and label the acis. Save your matlab script as drill 10.m Do not use the fplot command. 1. Plot the function f(x) = (x + 5)2 for -5 <<<10. Include a plot title, and label both aris. 2. Use the subplot command to make two plots of...
1). For the function, f(x) X-4X+2XY+2Y2+2Y+14 a. Plot the surface function for X over [5 61, and Y over [-4,-2]," b. Draw the contour plot for X over [0 10], and Y over [-4,-2] and values for the contours 1.25 1.5 2 25 3 of V c. Write an m-file to find the minimum of the function using the gradient descent method. Use a starting value of [4,-4].
1). For the function, f(x) X-4X+2XY+2Y2+2Y+14 a. Plot the surface function for...
MATLAB Only MATLAB Only MATLAB Only Indicated in the script below, write a function, called arbpoly3, that accepts two inputs: i) a row vector, called c, containing the coefficients of the polynomial, starting with the coefficient for the lowest degree term, which is the constant term. ii) a row vector, called x, which is the set of real numbers where the polynomial is to be evaluated. The output, y, will be a vector containing the values of the polynomial, evaluated...