Signal Processing onramp - Signal measurements. Answer incorrect even though the code is correct according to the solution.

Why does it show an error when I have selected 't' for X-axis data. Please help.

7 Comments

i am also facing the exact same issue @MathWorks Support Team please look into this we wont get aicte certificate otherwise
i faced the same problem. I have been working on it for so long and still havent found any solution to it.I hope someone will respond to us.

Sign in to comment.

 Accepted Answer

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.

4 Comments

Thank You for helping us out @Renee Coetsee.
The code in the solution did not work and it still showed an error. I tried writing my own code but there was some error in that as well.
Thankyou.. This code worked for me. But for task5 the reset option is not working.
I has to again submit the task by changing the line in code.
maxIndices = islocalmax(pwr,"maxProminence",10,"SamplePoints",t);
@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!
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!

Sign in to comment.

More Answers (0)

Categories

Find more on Argument Definitions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!