Function's Specgram

11 visualizzazioni (ultimi 30 giorni)
Batuhan Istanbullu
Batuhan Istanbullu il 8 Gen 2021
Modificato: Cris LaPierre il 8 Gen 2021
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 ?

Risposte (1)

Cris LaPierre
Cris LaPierre il 8 Gen 2021
Modificato: Cris LaPierre il 8 Gen 2021
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 Commenti
Batuhan Istanbullu
Batuhan Istanbullu il 8 Gen 2021
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 il 8 Gen 2021
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.

Accedi per commentare.

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by