- /
- 
        Fibonacci numbers
        on 14 Nov 2023
        
        
 
    - 7
- 26
- 0
- 0
- 353
drawframe(1);
 Write your drawframe function below
function [flist] = drawframe(f)
global fold
if f==1 || f== 2
    fold =1;
end
global fnew
if f == 1 || f== 2
    fnew = 1;
end
global flist
if f == 1 || f== 2
    flist = [];
end
if f == 1
    flist = 1;
elseif f == 2
    flist = [1; 1];
elseif mod(f,6)==0
    cf = fold+fnew;
    fold = fnew;
    fnew = cf;
    flist = [flist; cf];
end
bar(flist)
text(1:length(flist),flist,num2str(flist),'vert','bottom','horiz','center');
axis tight
end


 

 
           