Test Results: Incorrect! 1.Does maxIndices exist? 2.Is findquakes defined correctly? 3.Is the x-axis data correct?

์กฐํšŒ ์ˆ˜: 3 (์ตœ๊ทผ 30์ผ)
Venkatbabu
Venkatbabu 2023๋…„ 9์›” 15์ผ
๋‹ต๋ณ€: Renee Coetsee 2023๋…„ 9์›” 15์ผ
  ๋Œ“๊ธ€ ์ˆ˜: 2
Venkatbabu
Venkatbabu 2023๋…„ 9์›” 15์ผ

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ฑ„ํƒ๋œ ๋‹ต๋ณ€

Renee Coetsee
Renee Coetsee 2023๋…„ 9์›” 15์ผ
Thank you for reporting this issue. This is a known bug and we are actively working on fixing it in the course.
In the meantime, the workaround for Task 4 to
  1. Click See Solution (left of the Submit button)
  2. Copy the entire solution from the solution script into the working script
  3. Submit Task 4
If that doesn't work, copy and paste the following code for Task 4:
% Find local maxima
maxIndices = islocalmax(pwr,"SamplePoints",t);
% Display results
figure
plot(t,pwr,"Color",[77 190 238]/255,"DisplayName","Input data")
hold on
% Plot local maxima
plot(t(maxIndices),pwr(maxIndices),"^","Color",[217 83 25]/255,...
"MarkerFaceColor",[217 83 25]/255,"DisplayName","Local maxima")
title("Number of extrema: " + nnz(maxIndices))
hold off
legend
xlabel("t")
Then in Task 5, Reset the script (left of the Submit button) and complete Task 5 normally.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Get Started with MATLAB์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by