%% Historico Comandos aula 7
mkdir aula_7
cd aula_7
what
doc
load census
whos
save meusdados
whos
what
clear
load meusdados
whos -file meusdados
clear
load meusdados pop
load( 'meusdados', 'pop' )
load( 'meusdados' )
clear
A = load( 'meusdados' )
A.cdate
clear
home
dir
load census
whos
plot( cdate, pop )
plot( cdate, pop, '*' )
semilogy( cdate, pop, '*' )
help polyfit
edit estuda_census
fator = exp( 1.77 )
pop( cdate==1990 )
P
close all
clear
home
load cities
whos
names
whos
categories
edit estuda_cities
whos
plot( ratings(:,4), '*' )
plot( ratings(:,6), '*' )
categories(6,:)
categories(4,:)
categories
close all
x
whos
boa_educao
names(boa_educao,:)
names(boa_educao,1:10)
close all
clear
home
load carsmall
whos
Model
whos
Origin
whos
edit estuda_cars
whos -file carbig
load carbig
when
whos
figure,plot( MPG, '*' )
economico = char( 406, 3 )
help char
economico = char( 32*ones(406, 3) )
economico = char( 32*ones(406, 3) );
whos
economico( MPG<25, : ) = 'não';
economico( MPG<25, : ) = repmat( 'não', sum(MPG<25),1);
economico( MPG>=25, : ) = repmat( 'sim', sum(MPG>=25),1);
economico
clear
home
load carbig
whos
NV = { 'Acceleration' 'MPG' 'Cylinders' }
sprintf( 'plot( x, %s, ''*'' )', NV{1} )
sprintf( 'plot( x, %s, ''*'' )', NV{2} )
sprintf( 'plot( x, %s, ''*'' )', NV{3} )
eval( sprintf( 'plot( x, %s, ''*'' )', NV{3} ) )
x = 1:26;
eval( sprintf( 'plot( x, %s, ''*'' )', NV{3} ) )
x = 1:size(Model,1);
eval( sprintf( 'plot( x, %s, ''*'' )', NV{3} ) )
eval( sprintf( 'plot( x, %s, ''*'' )', NV{1} ) )
clear
eval( 'A=10' )
eval( 'A=10' );
eval( 'A=10;' )
clear
load carbig
whos
NomVar = { 'Acceleration' 'Cylinders' 'Displacement' ...
'Horsepower' 'MPG' 'Model_Year' 'Weight' }
help plotmatrix
NomVar
Y = [ Acceleration Horsepower MPG Weight ];
whos Y
plotmatrix( Y )
Y = [ Acceleration Horsepower 1./MPG Weight ];
plotmatrix( Y )
m'
find( isnan(m) )
find( isnan(tf) )
find( isnan(Pnom) )
iok = find( ~isnan(Pnom) );
Pfit(1)
hold on
plot( Pnom(iok), polyval( Pfit, Pnom(iok) ), '-r' )
