Question: Write a MATLAB script to evaluate the equation f(x) = 2sinx + cos(x) + 10 for all values of x between -2n and 2n,
Write a MATLAB script to evaluate the equation f(x) = 2sinx + cos(x) + 10 for all values of x between -2n and 2n, in steps of 0.2, do solve by vectorization Question 2 Write a MATLAB function to find the distance between points (x1.y1, 21) and (x2, y2, 22) in a three- dimensional Cartesian coordinate system is given by the equation D = (x - x) + ( - Y) + ( - 2) Ask the user to input the values of (x1, y1, 21) and (x2, y2, 22). Question 3 Write a MATLAB program to create a mesh plot, surface plot and contour plot of the function for the interval -0.3 x 0.3 and -0.3m Sys 0.3m, in each case, plot the real part of z versus x and y. (10) 1 t t 2= Question 4 Write a MATLAB script to plot the implementation of Q1, a. Plot the resulting function f(x) using dashed red line. b. Plot the function using stem c. Add title, Axis, legend and grid on the plot.
Step by Step Solution
3.45 Rating (155 Votes )
There are 3 Steps involved in it
Heres a MATLAB script and functions to address your questions Question 1 MATLAB Script for fx Questi... View full answer
Get step-by-step solutions from verified subject matter experts
