arrayMix

# arrayMix - %the length must be multiplied by 2 in order to...

This preview shows page 1. Sign up to view the full content.

function both_vectors_interweaved=arrayMix(first_vector,second_vector) %usage: both_vectors_interweaved=arrayMix(first_vector,second_vector) %function that will interweave two vectors first_vector_length=length(first_vector).*2; %the length must be multiplied by 2 in order to account for the zeros that %must be placed if the lengths of the two vectors are different; also, if %the first vector has 4 numbers, then 8 spots need to be available to %interweave it with another vector second_vector_length=length(second_vector).*2;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %the length must be multiplied by 2 in order to account for the zeros that %must be placed if the lengths of the two vectors are different; also, if %the first vector has 4 numbers, then 8 spots need to be available to %interweave it with another vector both_vectors_interweaved(1:2:first_vector_length)=first_vector; %set equal to first_vector in order to place the both_vectors_interweaved(2:2:second_vector_length)=second_vector;...
View Full Document

## This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.

Ask a homework question - tutors are online