clear all
close all
clc
load('Filter_lower_M.mat');

M=input("Enter the initial (lower) number of channels, m = ");
validateattributes(M, {'numeric'}, {'scalar','integer','positive','even'});

M_high=input("Enter the final (higher) number of channels, M = ");
validateattributes(M_high, {'numeric'}, {'scalar','integer','positive','even'});

Ns=input("Enter the parameter Ns which links the prototype filter order and the number of channels N=M*Ns+M-1 , Ns = ");
validateattributes(Ns, {'numeric'}, {'scalar','integer','positive'});

delta=input("Enter the allowed error, delta = ");
validateattributes(delta, {'numeric'}, {'scalar','positive'});

N_lower=M*Ns+M-1;
S=Farrow_filter(M,M_high,Ns,delta,X(1:(N_lower+1)/2));
save('Filter_higher_M.mat', 'S');

