Wednesday, July 29, 2020

Matlab - Move sinus function toward x axis direction

% The Script plot a Sinus Graph Functin and move it to the x axis direction.
x= 0:0.1:2*pi
y = sin(x);

for i1=0:630
    y = sin(x- i1/100);
    plot(x,y);
    drawnow;
    F(i1+1) = getframe;
end

% One can use the movie function to Play recorded movie frames
% To play the movie two times, use movie(F,2).

No comments:

Post a Comment

Featured Post

Solve simple Absolute Value Inequality

  Exam - BARTON COLLEGE PRACTICE PLACEMENT TEST Ex. 39 Exercise: The inequality |8 - x| < 8   is equivalent to:   a) x < 0 b) x &g...