fn = input( 'file name: ', 's' ); fh = fopen( fn, 'r' ); ln = ''; count=1; while ischar( ln ) ln = fgets( fh ); if (ischar( ln ) && mod(count,2)==0) fprintf( ln ); end count=count+1; end fclose( fh );
I created a script that prints out the even line of a input file but i dont know how to make it print out the second word of each even line.
Best Answer