THIS NEEDS TO BE DONE IN MATLAB PLEASE SEND CODE 20. Plot y 322 + 8a+ 2 using fp
ID: 2262639 • Letter: T
Question
THIS NEEDS TO BE DONE IN MATLAB PLEASE SEND CODE
20. Plot y 322 + 8a+ 2 using fplot. If you're using an older version of Matlab then ezplot is fine as 4 pt well. Assigning this to p20 is just a way of the grading software checking it. Assign to p20. 21. The goal of this for loop is to add the numbers 2,4,6,, 492. Set the variable p21 equal to 0. Then (6 pts run a for loop which goes through all those numbers, adding them each in turn to p21, changing p21 each time. 22. The goal of this while loop is to find the first number whose factorial has 42 digits (meaning it's at 6 pts least equal to 104). Set the variable p22 equal to 1. Then, while p22! is less than 1041, inerease p22 by 1, changing p22 each time. Note that Matlab has a command for factorial. 23. Set the variable p23 equal to 20. Then run a for loop which goes through the numbers 8 pts 61 62 45 142' 1431445+1 and adds them in turn to p23, changing p23 each time. 24. Set the variable p24 equal to 8. Then run a while loop which, while p24 is less than 795157877, squares [8 pts it and adds 3, changing p24 each time. Understand: Even though we think of f(x)IExplanation / Answer
20) y = @(x)(3*x.^2+8*x+2);
p20 = fplot(y,[-10 10]);
21) p21 = 0;
for k = 2:2:492
p21 = p21+k;
end
22) p22 = 1;
while factorial(p22) < 1e+41
p22 = p22+1;
end
23) p23 = 20;
for k = 1:45
p23 = p23 + (6^k/(14^(k+1)));
end
24) p24 = 8;
while p24 < 795157877
p24 = (p24^2)+1;
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.