From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: optimize code
Date: Thu, 13 May 2010 15:46:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <hsh6sb$mgd$>
References: <hsfns7$jqk$> <>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1273765579 23053 (13 May 2010 15:46:19 GMT)
NNTP-Posting-Date: Thu, 13 May 2010 15:46:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:635492

fckool <> wrote in message <>...
> but i wanted find all linefeed's, not only one. it's because i have 3 files .txt with same text but with different number of linefeed's. And I need to have the same result in the 3 files..
> I had try to change the vector Simb to the vetor A, but it's doesn't work. 
> I have this error:
> "???  Index of element to remove exceeds matrix dimensions."
> Can you help me?

  You have me puzzled.  Given the way you processed the data to obtain Simb, it can have only one of each different character.  Therefore you can remove one linefeed at most from it.  If you want all linefeeds taken out of A, you should deal with A directly, not by way of Simb.

  You state that, "I had try to change the vector Simb to the vetor A", but the information contained in A is not present in Simb or Ocorr, only the list of different characters present and their counts, so there would be no way of changing Simb to A.  What is it you are actually trying to do?

Roger Stafford