eliminate - %this will give the opposite results of the...

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

View Full Document Right Arrow Icon
function vector_without_even_numbers=eliminate(vector) %function to eliminate the even numbers from a vector %usage: vector_without_even_numbers=eliminate(vector) %is it with only integers? vector_without_even_numbers=vector(~mod(vector,2)==0);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %this will give the opposite results of the vector(mod(vector,2)==0, which %would give you only the even integers; this way only the non-even values will %appear in the answer, because of the ~ symbol...
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