|
| From: | Markus Mützel |
| Subject: | [Octave-bug-tracker] [bug #62682] ezplot() gets different results between inline function and anonymous function |
| Date: | Wed, 29 Jun 2022 13:13:24 -0400 (EDT) |
Follow-up Comment #7, bug #62682 (project octave):
Matrix exponentiation and elementwise exponentiation *are* different
operations:
>> A = [1 2; 3 4];
>> A^2
ans =
7 10
15 22
>> A.^2
ans =
1 4
9 16
That is also the same for anonymous functions:
>> square = @(x) x^2
square =
@(x) x ^ 2
>> square (A)
ans =
7 10
15 22
>> elem_square = @(x) x.^2
elem_square =
@(x) x .^ 2
>> elem_square (A)
ans =
1 4
9 16
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62682>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |