function f = lowpassFIR(sample)
%Calculates Finite Impulse Response low pass filter coefficient
%using the windowing methods as well
passEdge = 100;
StopbandAtt = 20;
passbandRip =.05;
transWidth = 10;
Fs = sample;
%Step One: select number of coefficients%
deltaF = transWidth/Fs;
%Normalize for each window
rectN = round(0.9/deltaF);
hannN = round(3.1/deltaF);
hammN = round(3.3/deltaF);
blackN = round(5.5/deltaF);
rectPos = rectN/2;
rectNeg = (rectPos*-1);
%For the Vector Array
%rect = rectNeg:rectPos;
deltaSum= passEdge + (transWidth/2);
deltaF2= deltaSum/Fs;
for i = [rectPos:rectNeg]
%iterate through each value and plug into function in for loop
%each output of the function will be stored into another array
f= 2*i;
end
end
我已经对其进行了编辑,并认为这会起作用,但我收到了错误...
lowpassFIR 错误(第 6 行) passEdge = 100;
在调用“/Users/sergiogonzalez-palavicini/Documents/MATLAB/lowpassFIR.m>lowpassFIR”期间未分配输出参数“f”(可能还有其他参数)。