Signal Processing onramp - Signal measurements. Answer incorrect even though the code is correct according to the solution.
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kruthi.R
le 14 Sep 2023
Commenté : Renee Coetsee
le 19 Sep 2023
Why does it show an error when I have selected 't' for X-axis data. Please help.

7 commentaires
Réponse acceptée
Renee Coetsee
le 15 Sep 2023
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
- Click See Solution (left of the Submit button)
- Copy the entire solution from the solution script into the working script
- 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.
4 commentaires
Renee Coetsee
le 18 Sep 2023
@Kruthi.R are you still having an issue? If so, please post a screenshot of the code you are submitting for Task 4. Thank you!
Renee Coetsee
le 19 Sep 2023
This issue should now be fixed and you should not need to use the workaround to complete the task. Please comment if you are still having issues with this task!
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!