Professional Documents
Culture Documents
Aak PDF
Aak PDF
Problem
1. 2. 3.
MATLAB - CODE
@main script file @ Fibonacci file
fprintf('%d\t%f\t%f\t%f\t%f\t%f\n',k,lk,x1,y1,x2,y2);
if x1==x2
continue;
elseif y1>y2
a=x1;
elseif y2>y1
b=x2;
end
k=k+1;
end
these two file remains same , the equations file need to change for every equations;
Problem 1 Problem 2 Problem 3
Problem 2:
k lk x1 y1 x2 y2
2 2.291845 3.291845 0.208864 4.708155 0.200181
3 1.416309 4.708155 0.200181 5.583691 0.200610
4 0.875536 4.167382 0.201664 4.708155 0.200181
5 0.540773 4.708155 0.200181 5.042918 0.200004
6 0.334764 5.042918 0.200004 5.248927 0.200118
7 0.206009 4.914163 0.200015 5.042918 0.200004
8 0.128755 5.042918 0.200004 5.120172 0.200028
9 0.077253 4.991416 0.200000 5.042918 0.200004
10 0.051502 4.965665 0.200002 4.991416 0.200000
11 0.025751 4.991416 0.200000 5.017167 0.200001
Problem 3:
k lk x1 y1 x2 y2
2 2.291845 3.291845 -4.787811 4.708155 -4.995481
3 1.416309 4.708155 -4.995481 5.583691 -4.984792
4 0.875536 4.167382 -4.958755 4.708155 -4.995481
5 0.540773 4.708155 -4.995481 5.042918 -4.999909
6 0.334764 5.042918 -4.999909 5.248927 -4.997050
7 0.206009 4.914163 -4.999625 5.042918 -4.999909
8 0.128755 5.042918 -4.999909 5.120172 -4.999295
9 0.077253 4.991416 -4.999996 5.042918 -4.999909
10 0.051502 4.965665 -4.999941 4.991416 -4.999996
11 0.025751 4.991416 -4.999996 5.017167 -4.999985
plots