[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiply some colums, discarding others
From: |
Renato S. Yamane |
Subject: |
Multiply some colums, discarding others |
Date: |
Tue, 24 Nov 2009 17:29:51 -0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.9.1.4pre) Gecko/20090915 Thunderbird/3.0b4 |
Hi,
I have a doubt about how can I use Octave :-)
E.g.:
Matrix A is "freq", "impedance" and "phase", like this:
A =
20.66 12.32 49.63
21.47 13.75 48.86
22.30 15.92 47.71
23.17 18.43 45.06
24.07 22.61 39.76
I would like to get another Matrix, B, with the result of multiplication
of "impedance" and "phase", like this:
A(1,2) * cos(A(1,3))
A(2,2) * cos(A(2,3))
A(3,2) * cos(A(3,3))
A(4,2) * cos(A(4,3))
A(5,2) * cos(A(5,3))
As you can see, the collum "frequency" is not used.
The problem is: Matrix "A" have a lot of lines and I need avoid type one
by one, so I would like to know if is possible multiply *automatically*
to get "frequency" and multiplication of impedance and phase, like this:
Matrix "B" =
20.66 A(1,2) * cos(A(1,3))
21.47 A(2,2) * cos(A(2,3))
22.30 A(3,2) * cos(A(3,3))
23.17 A(4,2) * cos(A(4,3))
24.07 A(5,2) * cos(A(5,3))
Regards,
Renato S. Yamane
- Multiply some colums, discarding others,
Renato S. Yamane <=
- Re: Multiply some colums, discarding others, David Bateman, 2009/11/24
- Re: Multiply some colums, discarding others, Norm Hecht, 2009/11/24
- Re: Multiply some colums, discarding others, macy, 2009/11/24
- Re: Multiply some colums, discarding others, Judd Storrs, 2009/11/24
- Re: Multiply some colums, discarding others, Ron.Simonson, 2009/11/24