% Extracts from array 'data' all records with 'value' in the specified 'column' function [subset]=extract(data,column,value) np = size(data)(1); k = 1; for ( i=1:np ) if ( data(i,column) == value ) subset(k,:) = data(i,:); k = k+1; endif endfor end