This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: a = a + a_; b = b + b_; n = n + 1; end end end if n > 0 mag = sqrt(a^2+b^2); xlabel(mag/n); end end function [a b] = g(x,y) mag = x^2 + y^2; a = x/mag; b = y/mag; end function [x y] = position(x,y) x = round(x); y = round(y); if x < 0 x = 0; end if y < 0 y = 0; end end function z = drawO(x, y) hold on t = 0:0.1:2*pi; a = cos(t)/4; b = sin(t)/4; z = plot(x+a, y+b); hold off end function clearO(z) delete(z); end...
View Full Document
This note was uploaded on 03/12/2012 for the course CS 3220 taught by Professor Marschner during the Spring '09 term at Cornell University (Engineering School).
- Spring '09