im trying to make a series that gives me n terms of the fibonaci series, ive got it to work like the pure code but now its having troble once i put it into a funtion file
function x = fib(n)close all clear allx=create_array(1,n,1)for i=1:n x(i+2)=x(i)+x(i+1)end end
its having trouble with the variable n, also im calling a function inside this function so idk if this messes it up somehow?
Best Answer