Re: to get rid of identifical lines



Thus spake <Bin Jiang>:

> HI, I have a file line by line as follows
>
> aaaaaaaaaaa
> bbbbbbbbbbbbb
> bbbbbbbbbbbbb
> cccccccccccc
>
> now I want to get rid of repeated and identifical lines.
> I prefer vectorization to do this job. Any advice is appreciated.

Try:

b = unique(A,'rows');

/PB
--
A: Because it messes up the order in which people normally
read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.



Relevant Pages

  • Re: bin data
    ... Thus spake: ... > Are there any command that will arrange data into bin. ... Why is top-posting such a bad thing? ...
    (comp.soft-sys.matlab)
  • Re: add two matrix
    ... Thus spake: ... > but this way of making the calculations, with For loops is very slow, ... Try to preallocate C instead. ... Why is top-posting such a bad thing? ...
    (comp.soft-sys.matlab)
  • Re: matlab output question
    ... Thus spake: ... > I have a matlab question: ... > Suppose I want to output to a file with the following format: ... Why is top-posting such a bad thing? ...
    (comp.soft-sys.matlab)
  • Re: cell array access
    ... Thus spake: ... > <SNIP on the fast track... ... Why is top-posting such a bad thing? ... What is the most annoying thing on usenet and in e-mail? ...
    (comp.soft-sys.matlab)
  • Re: zeroing elemnts in a vector
    ... Thus spake: ... Hi Natanel! ... Why is top-posting such a bad thing? ... Prev by Date: ...
    (comp.soft-sys.matlab)