[Shape-univ] octave: hadamard product = entrywise product = Schur product
Boud Roukema
boud w astro.uni.torun.pl
Czw, 9 Cze 2011, 14:34:03 CEST
hi again SR/GR students
In octave, if you define matrices and column vectors and "row one-forms"
(called row vectors in octave), then operations you might find useful
include:
1.
http://en.wikipedia.org/wiki/Matrix_multiplication#Hadamard_product
Hadamard product = entrywise product = Schur product
4-element column vectors A and B
A .* B gives you the Hadamard product = entrywise product = Schur product
meaning another 4-element column vector
(Hadamard product also has a different meaning - see the Wikipedia section)
- similar for row vectors, matrices, etc.
2. sum(A)
For a 1D column vector or "row one-form", the meaning and syntax are obvious.
For a 2D matrix, you can add along rows or columns - but you probably don't
need this for these tensor exercises.
3. work on or print a row or column of a matrix
example: the 2nd column of matrix g is
g(:,2)
example: the 3rd row of matrix g is
g(3,:)
4. get the inverse of matrix g
type
doc inverse
and read the documentation :).
pozdr
boud
On Thu, 9 Jun 2011, Boud Roukema wrote:
> hi SR/GR students,
>
> Most of you are at KRA now, so i've opened up scoring for
> the exercises until 15.30. For people who cannot finish the
> exercises today, please propose another day e.g. next week.
> There is no point doing the exam if you have not passed
> (got at least 3 points) in the zaliczenia (there's probably
> also a formal UMK rule on this...)
>
> For the exam, some people are thinking of
>
> Tuesday 21.06.2011, from the 9.00 bus
>
> but this is only a proposal, not yet definite.
>
> pozdr
> boud
>
> _______________________________________________
> Shape-univ mailing list
> Shape-univ w cosmo.torun.pl
> http://cosmo.torun.pl/mailman/listinfo/shape-univ
>
Więcej informacji o liście Shape-univ