Академический Документы
Профессиональный Документы
Культура Документы
m 1 of 1
clear
clc
%Soluo exata
x = linspace(0.5,2.5,n);
f = -(x.^2)+3.*x-1.25;
%Funo f(x)
%f = -(x.^2)+(3.*x)-1.25
%------------------------------
%Primeira derivada de f(x)
% f1 = -(2.*x)+3
%------------------------------
%Segunda derivada de f(x)
% f2 = -2;
%Clculo do Passo
h = (b-a)/(n-1);
%Formatao do plot
legend('Soluo Exata','1 Ordem','2 Ordem')
axis tight %sets the axis limits to the range of the data.
grid on %adds major grid lines to the current axes.