From: Maxx Chatsko on 12 Jul 2010 15:21 So I guess my real question isn't about for loops, but about passing in rows of data from an array of data into an array of zeros. If I have zero_array(min:max,:)=data_array(???) is there a way to skip every fourth row in five when passing the data into the new array? Maxx I'll be more precise next time. Promise.
From: James Tursa on 12 Jul 2010 20:09 "Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i1fpv1$5ga$1(a)fred.mathworks.com>... > So I guess my real question isn't about for loops, but about passing in rows of data from an array of data into an array of zeros. If I have > > zero_array(min:max,:)=data_array(???) > > is there a way to skip every fourth row in five when passing the data into the new array? > Maxx > I'll be more precise next time. Promise. You can use logical indexing. e.g., [x y] = size(zero_array); z = true(1,x); z(4:5:end) = false; zero_array(z,:) = data_array(etc.); James Tursa
|
Pages: 1 Prev: Reading DICOM US clip (multiframe array) Next: perturbation+for loop |