erreor in matlab in the function freqz

조회 수: 4 (최근 30일)
boutaina doudouche
boutaina doudouche 2020년 12월 23일
댓글: Star Strider 2020년 12월 23일
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 :

답변 (1개)

Star Strider
Star Strider 2020년 12월 23일
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
boutaina doudouche
boutaina doudouche 2020년 12월 23일
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
Star Strider
Star Strider 2020년 12월 23일
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.

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

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by