erreor in matlab in the function freqz

Hello everyone,
i have an error in MATLAB that i can't have a solution,please help me if you can
this is the code MATLAB:
Nt=7;
N=(Nt-1)/2;
n=-N:1:N;
h=(1/3)*sinc(n/3);
[H,F] = freqz(h ,1 , 1024);
subplot(3,1,2),plot(abs(H)),title(' le gain');
subplot(3,1,3),plot(angle(H)),title('la phase');
and this is the error :

Antworten (1)

Star Strider
Star Strider am 23 Dez. 2020

0 Stimmen

The code works correctly when I run it, and indicates that it creates a lowpass filter with a passband of about .
You actually did not post what the error message was, only that it appeared. What is the full error message (all the red text)?

2 Kommentare

boutaina doudouche
boutaina doudouche am 23 Dez. 2020
the error message is in this line :[H,w] = freqz(h,1,1024)
i don't know what to do and i tommorow i must send this TP to my professor
There must be more to the error message than that.
In its absence, do you have your own funciton or variable named freqz?
To see if you do, run this from the Command Window or a script:
which freqz -all
The only result should be:
C:\Program Files\MATLAB\R2020b\toolbox\signal\signal\freqz.m
(or something simillar for your release).
If you get anything else, that is the problem and the solution is to re-name your function or variable.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Signal Processing Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 23 Dez. 2020

Kommentiert:

am 23 Dez. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by