Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Matrix Functions

Hi,
I work often with named arrays (like range("matrix")).

I need
1. to address sub-matrices - for example entire i-th column of
"matrix". But in formulas (like {=matrix(1.column) -
matrix(2.column)}, or matrix(2..3,2..5) - it denotes submatrix of
"matrix" consisting of intersection of rows 2 and 3 and columns 2 to
5.

2. to have some functions like rowSums, colSums for instant summing of
matrix rows and cols (again for named array as parameter).

Briefly I want to use array-formulas with names of arrays as operands
instead of referencing cells.

Do I need to program it myself or is it anywhere in Excel or is it
already programmed by anybody?

thanks Martin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Matrix Functions

Martin Mrazek wrote:
Hi,
I work often with named arrays (like range("matrix")).


I take it you mean named ranges, not named arrays. Assuming proper
qualification,

=INDEX(matrix,n,0) will return an array of the values in the nth row of
the range named "matrix";

=INDEX(matrix,0,n) will return an array of the values in the nth column.

=SUM(INDEX(matrix,n,0)) will therefore return the sum of the numeric
values in the nth row, and =SUM(INDEX(matrix,0,n)) will return the sum
of the numeric values in the nth column.

If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook, the
following will return the subarray of the intersection of the 2nd to 5th
columns and the 2nd to 3rd rows of the range named "matrix":

=SubArray(matrix, 2, 5, 2, 3)

And if you chose to add that file to your library, then if you were
working in VBA rather than on the worksheet, RowVector(myMatrix, n) will
return an array of the elements in the nth row of the array referred to
by the variable myMatrix, and ColumnVector(myMatrix, n) will return an
array of the elements in the nth column. These are not as efficient in
execution as the VBA analogs of the INDEX functions above, but in some
circumstances can present functionality advantages.

On the worksheet, =RowVector(matrix, n) and =ColumnVector(matrix, n) are
also available, but are not as efficient in execution as the INDEX
functions above.

Alan Beban


I need
1. to address sub-matrices - for example entire i-th column of
"matrix". But in formulas (like {=matrix(1.column) -
matrix(2.column)}, or matrix(2..3,2..5) - it denotes submatrix of
"matrix" consisting of intersection of rows 2 and 3 and columns 2 to
5.

2. to have some functions like rowSums, colSums for instant summing of
matrix rows and cols (again for named array as parameter).

Briefly I want to use array-formulas with names of arrays as operands
instead of referencing cells.

Do I need to program it myself or is it anywhere in Excel or is it
already programmed by anybody?

thanks Martin


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a value out of a Matrix nsd Excel Discussion (Misc queries) 4 January 28th 10 05:15 PM
Sum with matrix functions? Aale de Winkel Excel Worksheet Functions 8 September 18th 09 01:35 PM
How can I transpose nXm matrix to mXn Matrix MIHir Excel Worksheet Functions 2 August 9th 08 11:44 AM
Using Matrix functions on complex numbers Greg Conway Excel Worksheet Functions 0 April 20th 08 11:11 AM
IF and VLOOKUP functions for a matrix overview Marc Bucher Excel Worksheet Functions 4 November 2nd 07 07:50 AM


All times are GMT +1. The time now is 08:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"