- /
-
MATLAB Logo Isn't Changing
on 14 Nov 2023
- 4
- 21
- 0
- 1
- 249
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent c F
if f==1
c=[.5,.5,.5 % grey
.07,.2,.3 % dark blue
1,1,.4 % faded yellow
.5,.5,.5]; % grey
c=interp1([1,16,32,48],c,1:48);
% Get MATLAB logo outline
logo
i=getframe(gcf);
[x,y]=find(imrotate(edge(mean(i.cdata,3)),-90));
g=[.3,.7,.3]; % green
fill(x,y,g,'EdgeColor',g)
axis([-120,445,-45,445],'equal','off')
F=gcf;
end
F.Color=c(f,:);
end