Using MatLab bConsider the functions below both of which are
Using MatLab
b.)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.
y1=x+5
y2=e^(3x)+sin(x)
c.) Modify your function from 3(b) so that, after evaluating the value of y1 for a given value of x, an intermediate calculation is performed which divides x by 10 before it is used in evaluating y2. Evaluate your function at the same points as 3(b) and compare the results
for part b i have everything but the graphs, i am not sure how to plot these
z=1;
[Z1,Z2]=func2(z);
j=2;
[J1,J2]=func2(j);
k=3;
[K1,K2]=func2(k);
l=4;
[L1,L2]=func2(l);
m=linspace(0,10,1000);
[M1,M2]=func2(m);
and I dont know how to do part c
Solution
matlab plot function:
define x,by specifying the range of values for the variables x,for which the functionis to be plotted.
define the function y=f(x)
call the plot command ,as plot(x,y)
