Ahhh, this is much better :) Any improvements on this? Its still a bit slow :/
%Expand I and Q Data to longer arrays
%Expands the original data by copying each number a few times
function [I_mod Q_mod] = expandIQ(I,Q,expandfactor)
expandfactor = round(expandfactor);
I_mod = ones(1,length(I)*expandfactor);
Q_mod = ones(1,length(I)*expandfactor);
for i=1:length(I)
start = (i-1)*expandfactor+1;
I_mod(start:(start+expandfactor-1)) = I(i).*I_mod(start:(start+expandfactor-1));
Q_mod(start:(start+expandfactor-1)) = Q(i).*Q_mod(start:(start+expandfactor-1));
end
if(length(I_mod) ~= length(I)*expandfactor)
error('Unexpected length of I_mod')
end