- /
-
playing around with the pcolor() documentation
on 1 Dec 2023
- 8
- 12
- 0
- 0
- 179
drawframe(1);
Write your drawframe function below
function drawframe(f)
% just messing around with the parametric grid example from https://www.mathworks.com/help/matlab/ref/pcolor.html?s_tid=doc_ta
% would love to see people make cooler stuff like this 👀
[X,Y] = meshgrid(-3:6/17:3);
XX = 2*X.*Y;
YY = X.^2*abs(sin(f/6)) + Y.^2*abs(cos(f/8));
colorscale = [1:18; 18:-1:1];
C = repmat(colorscale,9,1);
pcolor(XX,YY,C);
xlim([-20 20]); ylim([0 20])
end