This problem needs to be solved in matlab using a custom function, cant quite fi
ID: 2315704 • Letter: T
Question
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)
Explanation / Answer
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);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.