Function's Specgram

7 ビュー (過去 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 Center および File ExchangeAudio 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