Spectral Analysis Techniques Course _ Issue plotting a window created with Window Designer in MATLAB

조회 수: 1 (최근 30일)
Hi everyone,
I'm working on the "Spectral Analysis Techniques" course on MathWorks, and I'm stuck on Task 1 of the "Create and Apply Windows" activity.
I followed the instructions to create a rectangular window using Window Designer, set the length to 2400, and saved it with the name w.
Now, the task says:
"Enter the command for plotting the window created in task 1. Plot w versus t."
I tried the following command:
plot(w, t)
But I got an error, and the course marks it as incorrect. I also tried:
plot(0:length(w)-1, w)
But that didn’t work either in the course platform.
It says:
❌ Is the x-axis data correct?
❌ Is the y-axis data correct?
Can anyone explain the correct way to plot the window in this case? I just want to display the rectangular window correctly in the time domain.
Thanks in advance for your help!

채택된 답변

Cris LaPierre
Cris LaPierre 2025년 5월 3일
편집: Cris LaPierre 2025년 5월 3일
There seems to be a bug with this task. Please report this directly to MathWorks here: https://www.mathworks.com/support/contact_us.html
You need to make some changes to the script in order to pass.
  1. w should be defined by Window Designer, not the code. Delete this line of code in the Task 1 section: w=ones(n,1)
  2. The assessment is looking at the wrong figure. Comment out the code in the Task 2 section: periodogram(sig,w,2^12,fs);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by