For Programmers: Free Programming Magazines  


Home > Archive > Matlab > August 2005 > Comparison of lines in a text file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Comparison of lines in a text file
Joshua

2005-08-31, 7:01 pm

Hi,

I have a text file with 8 lines. I have read the first line to some
variable temp using the function fget1. This temp has to be compared
with the remaining 7 lines in the text file. Is there a way I can do
it.?

Text file contains the following data

1 2 3 4 5 6 7 8
2 4 5 6 7 1 3 5
4 7 8 1 3 5 7 9
2 4 6 7 8 1 2 3
2 4 6 8 2 1 4 8
3 4 5 6 7 8 9 1
2 3 4 5 6 7 8 9
3 4 5 6 7 8 8 1.

Thanks in advance
Joshua
per isakson

2005-08-31, 7:01 pm

Joshua wrote:
>
>
> Hi,
>
> I have a text file with 8 lines. I have read the first line to some
> variable temp using the function fget1. This temp has to be
> compared
> with the remaining 7 lines in the text file. Is there a way I can
> do
> it.?
>
> Text file contains the following data
>
> 1 2 3 4 5 6 7 8
> 2 4 5 6 7 1 3 5
> 4 7 8 1 3 5 7 9
> 2 4 6 7 8 1 2 3
> 2 4 6 8 2 1 4 8
> 3 4 5 6 7 8 9 1
> 2 3 4 5 6 7 8 9
> 3 4 5 6 7 8 8 1.
>
> Thanks in advance
> Joshua


My ixStrFindVec [File Exchange] is one (efficient) way to do it (for
integers). / per
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com