[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is different ^ and .^?
From: |
Mike Miller |
Subject: |
Re: Why is different ^ and .^? |
Date: |
Mon, 23 May 2005 17:32:57 -0500 (CDT) |
On Tue, 24 May 2005, Javier Arantegui Jimenez wrote:
Mike Miller said:
a^2 means a*a
a.^2 means "square every element of a"
a^2 therefore requires that 'a' be a square matrix or scalar.
a.^2 does not require that 'a' have any particular dimensions
OK. I understand it. But, could Octave be smart enough to distinguish
between those cases? I think that other programs, like Euler, don't need
to do this distinction.
Suppose 'a' is a square matrix, then what does this mean?:
a^2
I think it is best not to try to read the user's mind. ;-)
See what I mean?
I don't know about Euler, but it sounds like you also are unsure of how it
works. We know how MATLAB works, and we try to keep Octave compatible
with MATLAB, at least for simple functions like this one.
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------