 .
.  erreor in matlab in the function freqz
    4 views (last 30 days)
  
       Show older comments
    
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 :

0 Comments
Answers (1)
  Star Strider
      
      
 on 23 Dec 2020
        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 Comments
  Star Strider
      
      
 on 23 Dec 2020
				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.  
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
