This problem needs to be solved in matlab using a custom fun
This problem needs to be solved in matlab using a custom function, cant quite figure out
function phi = prob2_6(n) is the start of the custom function
test cases:
n = 5 -> phi = 1.618034154176712
n= 10 -> phi = 1.618033988674355
n= 50 -> phi = 1.618033988749895 (cases to try for n)
Solution
function phi =prob2_6(n)
format long
k=0:n;
phi1=((((-1).^(k+1)).*factorial(2.*k+1))./(factorial(k+2).*factorial(k).*(16.^(k+1))));
phi=sum(phi1);
phi=phi+(13./8);
