help xlsread
[DN,DT]=xlsread( 'Nivel_Sistema_Cantareira.xls' );
whos
DN
DT
DT(1:5,:)
DN(1:5,:)
nivel = DN(:,5);
ordem = DN(:,1);
nivel = DN(:,6);
figure, plot( ordem, nivel, '*' )
ylabel( 'Nível do sistema Cantareira (%)' )
xlabel( 'Dia desde 1/1/2014 (dias)' )
set( gca, 'fontsize', 16 )
ylabel( 'Nível do sistema Cantareira (%)' )
xlabel( 'Dia desde 1/1/2014 (dias)' )
help xlabel
help polyfit
P = polyfit( ordem, nivel, 1 )
hold on
plot( ordem, polyval(P,ordem), '-r' )
roots(P)
P = polyfit( ordem, nivel, 2 )
plot( ordem, polyval(P,ordem), '-k' )
roots(P)
figure, plot( (-100:500), polyval(P,(-100:500)), '-k' )
hold on
plot( ordem, nivel, '.b' )
close all
clear all
[DN,DT]=xlsread( 'Nivel_Sistema_Cantareira.xls', '2003_2014' );
DN(1:5,:)
DT(1:5,:)
ordem = 15*(0:(size(DN,1)-1)).';
nivel = DN(:,5);
figure, plot( ordem, nivel, '*' )
edit funcao_nivel
help nlinfit
close all
home
doc nlinfit
help nlinfit
help @
help function_handle
f = @(x)(x.^2)
f(1)
f(2)
f(1:10)
f = @(P,x)(P(1)*x + P(2))
figure, plot( 1:10, f([1 2],1:10), '.-' )
x = [0:10]
y = 1*x+2+randn(size(x))
figure, plot( x, y, '.' )
figure, plot( x, y, '*' )
P = polyfit(x,y,1)
beta = nlinfit(x,y,f,[1 2])
P = polyfit(x,y,2)
help fminsearch
