Home > robbins > findstrline.m

findstrline

PURPOSE ^

FINDSTRLINE returns indexes of lines of 'matstr' which contain 'str'

SYNOPSIS ^

function i = findstrline(matstr,str)

DESCRIPTION ^

 FINDSTRLINE returns indexes of lines of 'matstr' which contain 'str' 

  Usage: i = findstrline(matstr,str)

 Paul Robbins 1996

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function i = findstrline(matstr,str)
0002 % FINDSTRLINE returns indexes of lines of 'matstr' which contain 'str'
0003 %
0004 %  Usage: i = findstrline(matstr,str)
0005 %
0006 % Paul Robbins 1996
0007 
0008 i = [];
0009 for j = 1:size(matstr,1);
0010   if any(findstr(matstr(j,:),str))
0011     i = [i j];
0012   end
0013 end

Generated on Wed 30-Nov-2005 15:40:09 by m2html © 2003