Re: Newbie: Subtract a vector from m-n-p array?
- From: Doug Schwarz <see@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 00:03:54 GMT
In article <fpfo56$6tp$1@xxxxxxxxxxxxxxxxxx>,
"Volker K" <klinkv.NOSPAM@xxxxxxxx> wrote:
Problem: I only have Matlab 7.2 :-(
I wonder that there's
no possibility in MatLab to do these kind of operations:
M(:,:)-V(1)
M(:,:)-V(2)
M(:,:)-V(3)
M(:,:)-V(4)
...
M(:,:)-V(end)
I guess it is a common problem...
All hope is not lost. you can download my genop.m from the FEX and use
it instead of bsxfun. It will be slower, but it will work and no data
will be copied.
<http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId
=10333&objectType=FILE>
(watch out for wrapped URL)
genop(@minus,M,permute(V,[3 2 1]))
--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.
.
- References:
- Newbie: Subtract a vector from m-n-p array?
- From: Volker K
- Re: Newbie: Subtract a vector from m-n-p array?
- From: Walter Roberson
- Re: Newbie: Subtract a vector from m-n-p array?
- From: Volker K
- Re: Newbie: Subtract a vector from m-n-p array?
- From: Doug Schwarz
- Re: Newbie: Subtract a vector from m-n-p array?
- From: Volker K
- Newbie: Subtract a vector from m-n-p array?
- Prev by Date: Re: Avoiding for-loop
- Next by Date: Reverse
- Previous by thread: Re: Newbie: Subtract a vector from m-n-p array?
- Next by thread: Re: Newbie: Subtract a vector from m-n-p array?
- Index(es):
Relevant Pages
|
Loading