ReverseCols - %of matrix1 we have to make sure the dimensions of the arrays are equal to%prevent errors new_matrix=matrix1%assigns the output to

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

View Full Document Right Arrow Icon
function new_matrix=reverseCols(matrix1) %function that flips every column with an even index of the given matrix %upside-down %usage: [new_matrix]=reverseCols(matrix1) matrix1(:,2:2:end)=matrix1(end:-1:1,2:2:end); %assigns the even columns of matrix1 the flipped values of the even columns
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %of matrix1; we have to make sure the dimensions of the arrays are equal to %prevent errors new_matrix=matrix1; %assigns the output to the newly created matrix1...
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 Institute of Technology.

Ask a homework question - tutors are online