Generalized Array Operations
by Douglas Schwarz
13 Mar 2006
(Updated 15 Mar 2006)
Computes generalized array operations by expanding singleton dimensions.
|
Watch this File
|
| File Information |
| Description |
Computes functions of arrays where the singleton dimensions of each have been expanded to be the size of the other, without actually copying any data.
For example,
x = rand(4,3,1,2);
y = rand(4,1,5,2);
z = genop(@times,x,y);
size(z) will be [4 3 5 2]. |
| Acknowledgements |
This submission has inspired the following:
bsxfun substitute
|
| MATLAB release |
MATLAB 7.0.4 (R14SP2)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (4) |
| 14 Mar 2006 |
a user
|
|
|
| 15 Mar 2006 |
Douglas Schwarz
|
|
|
| 23 Nov 2007 |
Emmanuel FARHI
|
|
|
| 27 Dec 2008 |
Paolo de Leva
|
|
|
| Updates |
| 15 Mar 2006 |
fixed documentation typo |
| 15 Mar 2006 |
Modified so it works with a function returning logical. |
|
Contact us at files@mathworks.com