a=4:-1:4;w=a*randn(350,1);n = 400000;proc_1= zeros(1, n);for i = 1 : n if rand() <= 0.5 proc_1(k) = x1(randi(length(x1))); else proc_1(k) = x2(randi(length(x2))); end resultant(k)=proc_1(k)+w(k);end
i'm running this script but it keeps giving me this error=> " ??? Index exceeds matrix dimensions."
Best Answer