using linspace to transition through frequencies of a fdesign.bandpass object

Hi. I am a complete newb when it comes to Matlab, and so please forgive me if this is a stupid question. As an experiment i am practising by writing a peice of music using matlab, using sinewaves and stuff and i want to use a bandpass filter in a noise wave and move the frequency of the bandpass. At the moment i have the current code:
noise=randn(size(l32));
order=100; %Steepness of the slope
for c=1:1:8
bwbottom=c/8*5e6;
bwtop=c/8*5.2e6;
hd = fdesign.bandpass('N,Fc1,Fc2',order,bwbottom,bwtop,20e6);
n1=[n1 0 hd];
end
out = filter(n1,noise);
%fvtool(hd);
soundsc(out,Fs);
So i want bwtop (-bandwidthtop) and bwbottom (-bandwidthBottom) to increase as the loop progresses and write it to the array. The error I am getting is: Error using horzcat The following error occurred converting from double to opaque: Error using horzcat Undefined function 'opaque' for input arguments of type 'double'.
Error in Composition2 (line 49) n1=[n1 0 hd];
Many thanks, Tommy

Answers (0)

Products

Asked:

on 21 May 2013

Community Treasure Hunt

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

Start Hunting!