Hello,
the example 1 given in poctave help :
% EXAMPLE 1:
% Construct a unit-variance white noise input signal sampled at
% 44.1 kHz. To determine the octave spectrum, choose a filter
% order of 8. Visualize the octave spectrum between 120 Hz and
% 20 kHz.
Fs = 44.1E3;
xInp = randn(2^16,1);
poctave(xInp,Fs,'FrequencyLimits',[120 20E3],'FilterOrder',8);
just doesn't work on my computer here you can find the error message is :
Error using bar (line 213)
Data inputs must match the axis configuration. A numeric axis must have numeric data inputs or data inputs which can be converted to
double.
Error in poctave>localplot (line 745)
pObject = bar(centerFreqLabels, PdB);
Error in poctave (line 205)
localplot(P,CF,opts);
Does anyone have an idea of what is wrong ?

댓글 수: 1

Mathieu NOE
Mathieu NOE 2021년 5월 16일
편집: Jan 2021년 5월 16일
hello
according to the line numbers where the errors occured, its seems your poctave version differs from mine (no errors)
I have R2020b update 1
code for poctave :
% [Copyrighted code removed]

댓글을 달려면 로그인하십시오.

 채택된 답변

Star Strider
Star Strider 2021년 5월 16일

0 개 추천

The code you posted runs correctly in R2021a, since it runs correctly in the online Run feature here that uses it —
Fs = 44.1E3;
xInp = randn(2^16,1);
poctave(xInp,Fs,'FrequencyLimits',[120 20E3],'FilterOrder',8);
My only suggestion is to exit and restart MATLAB, then run the example again to see if the problem persists after that.

댓글 수: 2

Daniel Mazzoni
Daniel Mazzoni 2021년 5월 16일
Restart the PC : the universal windows solution !
Star Strider
Star Strider 2021년 5월 16일
That certainly works as well!
All I usually need to do is restart MATLAB in situations like that, although Windows issued updates in the last couple days that might cause problems without restarting.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

릴리스

R2021a

질문:

2021년 5월 16일

댓글:

2021년 5월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by