- /
-
Wave
on 27 Nov 2023
- 27
- 40
- 0
- 3
- 185
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent C h n newC i
if f == 1
n = 24;
C = rand(n);
figure
h = pcolor(C);
newC = sort(h.CData);
i = 1;
end
if i <=n
h.CData(:,i) = newC(:,i);
else
h.CData(:,mod(i-1,n)+1) = C(:,mod(i-1,n)+1);
end
i = i+1;
end