y = x^4 - 4x^3 - 6x^2 + 15 for -3 lessthanorequalto x lessthanorequalto 6 In MAT
ID: 3806195 • Letter: Y
Question
y = x^4 - 4x^3 - 6x^2 + 15 for -3 lessthanorequalto x lessthanorequalto 6 In MATLAB do the following: a. Use a for loop and the plot command to graph the function within the given bounds above. b. Use the fplot command to plot the same function Plot the cosine of an angle versus the angle in degrees from 0 to 360 in MATLAB via the following: a. Using a for loop and subsequent plot command b. Using the plot command y = 3 * Squareroot x from 0 to10 In MATLAB do the following: a. Use a for loop and the plot command to graph the function within the given bounds above. b. Use the fplot command to plot the same functionExplanation / Answer
1.
(a) Using for loop:
for x = -2:.1:2
y = (x.^4)-(4*x.^3)-(6*x.^2)+15;
plot(x,y)
hold on
end
(b) using fplot command:
function y = myfunc (x)
y = (x.^4)-(4*x.^3)-(6*x.^2)+15;
end
fun= @myfunc;
fplot(fun, [-2 2])
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.