Professional Documents
Culture Documents
Paper 03411740007001 - Joana Maria Soares Sarmento
Paper 03411740007001 - Joana Maria Soares Sarmento
Paper 03411740007001 - Joana Maria Soares Sarmento
ABSTRACT
In another post, you can find the function for implementing this special golden search method
and the script for minimizing the above function with the cusp. This script is basically the
same as the one written by Braun and Murdoch on Pages 134-135 in their book. My script
used slightly more self-evident variable names and included debugging statements to help
me to identify why my function was not working properly when I first wrote it. Debugging
statements are statements that show the values of key variables being computed in the flow
of a script (and often within loops or branches) to identify the point in the flow at which the
script stopped working properly. My mathematical and statistical programming skills
became much better when I began using debugging statements. They are good
for debugging, but should generally be commented out when the script is corrected and
working properly.
a. If xl = 0 and xu =4
3. DISCUSSION
MATLAB
Script One :
clear all
clc
%BISECTION
%untuk mencari xmin dan xmax yang lama
f=@(x) x.^3-x-6 ; %dot (.) berfungsi jika d
pangkatkan pada matriks
xmin=-10 ;
xmax =10;
error_max=0.00001; %error sekecil kecilnya
iter_max=1000; % iter sebagai
pengulangan
data=xmin:xmax;
disp('Root=')
xr=(x1+xu)/2
f=@ (x)x-x.^2/10;
xmin=-10 ; % xmin dan xmax
ditentukan berdasarkan dilihat dari titik tengah
suatu grafik.
%dari titik terdekat dari titik
tengah.