From: Roger Stafford on
fckool <xtrangekid(a)sapo.pt> wrote in message <1896069628.127144.1273714766212.JavaMail.root(a)gallium.mathforum.org>...
> hello
>
> Ok, i think i understood that.
>
> I have other question:
>
> who can i detect the ASCII code 10 (line-feed) and subtract it in 'Simb' and one value on 'Occur'?
>
> Thank you

With the linefeed occurring in 'Simb' as the numeric value 10 before you have changed it to type 'char', just do a 'find' on it at that point (before the change to 'char'.)

q = find(Simb==10); % Find index of linefeed value, if one is present
Simb(q) = []; % Remove the linefeed entry
Ocorr(q) = []; % Remove its corresponding count

Roger Stafford
From: fckool on
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?
From: Roger Stafford on
fckool <xtrangekid(a)sapo.pt> wrote in message <1141511283.129365.1273753856984.JavaMail.root(a)gallium.mathforum.org>...
> 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
From: fckool on
ok, my English is bad and I have not explained well.

I have several txt files, the only difference they have is the number of linefeeds.

I have to calculate the entropy and proprietary information of those files, and must all have the same result, for that I have to remove all linefeeds.

I was more clear?
From: Roger Stafford on
fckool <xtrangekid(a)sapo.pt> wrote in message <169058824.130614.1273768428891.JavaMail.root(a)gallium.mathforum.org>...
> ok, my English is bad and I have not explained well.
> I have several txt files, the only difference they have is the number of linefeeds.
> I have to calculate the entropy and proprietary information of those files, and must all have the same result, for that I have to remove all linefeeds.
> I was more clear?

Yes that is clearer, but the only thing I can think of is to remove linefeeds directly from the A vector before computing Simb and Ocorr.

I am curious about how computing Simb and Ocorr could have any bearing on the entropy or proprietary information contained in your files.

Roger Stafford