MATLAB code Please help me with right the code for Part B wh
MATLAB code. Please help me with right the code for Part B,
when the input is passed through the following function: y = e^Squareroot 56x + 3.21 + 4x + 0.2 x^2 evaluate the function at a range of x values from 0 to 1 with 143 elements. Consider the functions below, both of which are dependent on a single input, x. Create a function file that will return the value of both calculations when provided a value (or series of values) of x. Evaluate your functions for x values of 1,2,3 and 4 as well as the vector from 0 to 10 with 1000 elements. Plot your results, adding figure labeling, legends, etc. as necessary. You should present two plots, each with two lines. y_1 = x + 5 y_2 = e^3x + sin (x)Solution
Copy the following code and save it in matlab file (.m) with the name func.m. After that you can run the code
function [y1,y2] = func(x)
 y1=x+5;
 y2=exp(3*x) + sin(x);
figure
 title(\'Example Question\')
 plot(x,y1,x,y2)
 legend(\'y1=x+5\',\'y2=exp(3*x)+sin(x)\')
 xlabel(\'X\')
 ylabel(\'Y1,Y2\')
end

