help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

follow a simple Matlab program but not work on octave2.0.14


From: eric
Subject: follow a simple Matlab program but not work on octave2.0.14
Date: Sat, 22 Jan 2000 10:25:05 -0900

Dear Octave expert:

    I follow the simple program in book "Matlab for Engineers"
by Adrian Biran 
  and 
    Moshe Breiner
                     published by Addison Wesley
page 185 figure 4.10

but called in octave2.0.14, it response error , around the axis,

with attached program.

   hope to see your help and thanks in advance

eric
address@hidden
%VECROT Animation program which shows a rotating vector
% defined as a complex number
f = 50;         % frequency, Hz
omega = 2*pi*f;         % angular frequency, rad/s
tmax = 1/50;      % time for a complete rotation, s
time = [ ];
motion = [ ];
     axis('square')
     axis([-1 1 -1 1])
for t=0: tmax/36: tmax
     z = exp(i*omega*t);   %complex number description
     x = real(z);          % Cartesian projections
     y = imag(z);
     time = [ time t];
     motion = [motion y];
     plot([0, x], [0, y])
     pause(1.0)
end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]