[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: imaginary unit
From: |
Javier Arantegui |
Subject: |
Re: imaginary unit |
Date: |
Thu, 27 Apr 2006 10:11:22 +0200 |
User-agent: |
KMail/1.9.1 |
Hi,
El Miércoles, 26 de Abril de 2006 20:33, Przemek Klosowski escribió:
> e^(i*pi) is the natural way of calculating vectors in complex
> plane. It failed for me, though, and I realized that I used the
> variable 'i' as a loop index, overwriting its original value of an
> imaginary unit vector, which octave assigns on startup to i,I, j,J.
In Maxima:
(%i1) sqrt(-1);
(%o1) %i
Thus, there is no problem if you use the variable "i". But, you can assign a
new value to "%i":
(%i2) %i:2;
(%o2) 2
(%i3) %i^2;
(%o3) 4
Maybe this is not the best solution, but you just must remember to not use %
variables.
Probably because the Matlab compatibility thing this approach cannot be
adopted.
Javier
--
Javier Arántegui
Dept. Tecnologia de Alimentos / Dept. of Food Technology
Universitat de Lleida / University of Lleida (Spain)
Tel. +34 973702595
Fax +34 973702596
IM: Jabber - javier.arantegui (AT) jabberes.org
http://www.tecal.udl.es
Re: imaginary unit, Marek Szczypinski, 2006/04/27
Re: imaginary unit,
Javier Arantegui <=
Re: imaginary unit, Robert A. Macy, 2006/04/27
Re: imaginary unit, Bill Denney, 2006/04/28