Q:

Write a function that receives an x vector, a minimum value, and a maximum value, and plots sin(x) from the specified minimum to the specified maximum

0

Write a function that receives an x vector, a minimum value, and a maximum value, and plots sin(x) from the specified minimum to the specified maximum. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

plotXMinMax.m

function plotXMinMax(x, xmin, xmax)

% Plots sin(x) from the minimum value of x

% specified to the maximum

% Format of call: plotXMinMax(x, x minimum, x maximum)

% Does not return any values

x = linspace(xmin,xmax);

plot(x,sin(x),'*')

xlabel('x')

ylabel('sin(x)')

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now