• Remix
  • Share
  • New Entry

on 18 Nov 2023
  • 5
  • 5
  • 0
  • 0
  • 475
drawframe(1);
Write your drawframe function below
function drawframe(k)
omegamin = 0.0;
omegamax = 1.0;
nomegastep = 1000;
trans = 400; % number of transient points
out = 400;
x0 = 0.3;
omegastep = (omegamax-omegamin)/(nomegastep-1);
omega = (omegamin:omegastep:omegamax);
x = x0 * ones( 1, length(omega) );
xstart = x;
for i = 1:trans
x = x + omega - k .* sin(2.0 * pi * x) / 2.0 / pi; % circle map
end;
xin = x;
for i = 1:out
x = x + omega - k .* sin(2.0 * pi * x) / 2.0 / pi; % circle map
w = (x - xin)/i;
end;
figure(gcf), plot(omega,w,'.','markersize',3);
hold on
set(gca,'xlim',[omegamin omegamax]);
set(gca,'ylim',[-.10 1.1]);
axis off
end
Animation
Remix Tree