help-octave
[Top][All Lists]
Advanced

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

The i operator


From: Steve
Subject: The i operator
Date: Sun, 25 Jan 2009 22:39:31 -0500
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Hi,

I’d appreciate some advice with Octave and use of the i imaginary operator.

I can get this to work:

octave-3.0.3.exe:27> (2 * (pi) * 10.7e6 * 1.62e-6i)

ans = 0.00000 + 108.91273i


And this works where I define the constant w as 2*pi*10.7e6:

octave-3.0.3.exe:28> w = 2 * (pi) * 10.7e6

w = 6.7230e+007

octave-3.0.3.exe:29> (w * 1.62e-6i)

ans = 0.00000 + 108.91273i

I’d like to also define the constant L and use it in the calculation, but I get this error:

octave-3.0.3.exe:30> w = 2 * (pi) * 10.7e6

w = 6.7230e+007

octave-3.0.3.exe:31> L = 1.62e-6i

L = 0.0000e+000 + 1.6200e-006i

octave-3.0.3.exe:32> w * Li

error: `Li' undefined near line 32 column 5

error: evaluating binary operator `*' near line 32, column 3


How does one use the i operator with constants so that Octave recognizes the i as the imaginary operator?

Thanks.

Steve



reply via email to

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