%-- 04/07/13 --%
edit aleatorio_especial.m
help aleatorio_especial
home
path
help addpath
mkdir aula_4\
cd aula_4\
what
help aleatorio_especial
which aleatorio_especial.m
path
edit Lista_Limpa_Portugues.txt
load Lista_Limpa_Portugues.txt
help load
load -ascii Lista_Limpa_Portugues.txt
A = importdata( 'Lista_Limpa_Portugues.txt' );
whos
A{1}
M = A{1}
whos
M(1:15)
A{1}(1:15)
edit teste_texto.txt
B = importdata( 'teste_texto.txt' )
B.data
B.textdata
B.rowheaders
B = importdata( 'teste_texto.txt', ';' )
B = importdata( 'teste_texto.txt', ' ' )
clear
home
A = importdata( 'Lista_Limpa_Portugues.txt', ';' );
whos
M = A{1};
whos
M(1:25)
double( M(1:25) )
M(1:25)
double( M(1:25) )
double( M(1:18) )
M(1:18)
double( M(1:18) )
onde_espaco = find( M==' ' );
whos
Tamanhos = (onde_espaco(2:end)-onde_espaco(1:end-1))-1;
whos
hist( Tamanhos, 0:50 )
hist( Tamanhos, 0:20 )
hist( Tamanhos, 1:20 )
IDIOMA = 'Holandes';
['Lista_Limpa_' IDIOMA '.txt']
['Lista_Limpa_ ' IDIOMA '.txt']
close all
whos
M(1:15)
M(1:15)=='a'
quantos_as = sum( M=='a' )
quantos_as = sum( M=='b' )
hist( double(M), 1:255 )
char( 225:227 )
char( 231 )
char( 233:234 )
char( 237 )
[ h, i ] = hist( double(M), 1:255 )
[ h, i ] = hist( double(M), 1:255 );
onde_nao_eh_zero = find( h>0 )
[ h, i ] = hist( double(M), 0:256 );
h(97)
h(i==97)
i_nao_eh_zero = i( h>0 )
char( i_nao_eh_zero )
for j=1:length(i_nao_eh_zero)
sprintf( '%c %d', char(i_nao_eh_zero(j)), h(i_nao_eh_zero(j)) )
end
for j=1:length(i_nao_eh_zero)
disp( sprintf( '%c %d', char(i_nao_eh_zero(j)), h(i_nao_eh_zero(j)) ) )
end
[ h, i ] = hist( double(M), 0:256 );
onde_nao_eh_zero = find( h>0 )
onde_nao_eh_zero = find( h>0 );
i_nao_eh_zero = i( h>0 );
h_nao_eh_zero = h( h>0 );
for j=1:length(i_nao_eh_zero)
disp( sprintf( '%c %d', char(i_nao_eh_zero(j)), h_nao_eh_zero(j) ) )
end
double( 'z' )
char( fix( 97 + rand(1,10)*(122-97) ) )
[ h1 ] = hist( double(M), 1:256 );
p1 = h1 / sum( h1 );
char( aleatorio_especial(p1,10)' )
char( aleatorio_especial(p1,50)' )
