Function's Specgram

조회 수: 13 (최근 30일)
Batuhan Istanbullu
Batuhan Istanbullu 2021년 1월 8일
편집: Cris LaPierre 2021년 1월 8일
Hi, i have a function code in MATLAB and i want to plot the specgram of that function but could not find the right code of it
i used;
figure, specgram(getFilter), colorbar
but it gave me an error
Any Help ?

답변 (1개)

Cris LaPierre
Cris LaPierre 2021년 1월 8일
편집: Cris LaPierre 2021년 1월 8일
What error are you getting? Undefined function or variable 'specgram'.?
There is no specgram in the current version of MATLAB. What version are you using? Perhaps try using spectrogram, which replaced specgram around 2005.
  댓글 수: 2
Batuhan Istanbullu
Batuhan Istanbullu 2021년 1월 8일
function Hd = getFilter
figure, specgram(getFilter), colorbar
end
in the function there are some filtering codes, when write this it gives me an error like;
Function definitions in a script must appear at the end of the file.
Move all statements after the "getFilter" function definition to before the first local function definition.
I am using latest version of matlab, but I want to take a specgram of the function how can i do that
Cris LaPierre
Cris LaPierre 2021년 1월 8일
My suggestions
  1. You have apparently defined your function in the wrong place. Follow what the message says. If you need more help, see the Create Function in Files documentation page
  2. About specgram, see my first reply.

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

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by