[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: matrix-vector-op class ?
From: |
Jamie Morris |
Subject: |
Re: matrix-vector-op class ? |
Date: |
Thu, 06 Apr 2000 20:06:04 -0400 |
> How should we decide whether the rows or columns are to be scaled?
> A simple definition would be that
>
> v .* M == diag (v) * M (row scaling)
> M .* v == M * diag (v) (column scaling)
> I have also thought about allowing row or column scaling based on the
> orientation of the vector. Then v .* M or M .* v could do either
> operation, depending on the orientation of v. My idea is that if v
> is a column vector, it scales the rows and if it is a row vector it
> scales the columns.
Arrays with dimension larger than two are on the to-do list, right?
The first scale-orientation method presupposes there are only two choices;
the second one extends smoothly to arbitrary dimensionality.
If size(M) = [A B C D E F G H] and size(v) = [1 1 P 1 1 Q 1 1],
then v .* M and M .* v both have the effect
M(xa, xb, xc, xd, xe, xf, xg, xh) *= v(xc, xf) [ aka v(1,1,xc,1,1,xf,1,1) ]
(There are issues with how to deal nicely when you have a single low-dim v
that you want to use to scale m's of different high dims, or to scale
different indices of some high-dim m's, but I think they're issues that
arise in having high-dim arrays anyway.)
Jamie
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------