source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/ndmax.m
@
177
Last change on this file since 177 was 37, checked in by , 15 years ago | |
---|---|
File size: 380 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function x = ndmax(x,dim) |
2 | % NDMAX Multi-dimensional maximization. | |
3 | % NDMAX(X,DIM) takes the maximum element along the dimensions in DIM, | |
4 | % and squeezes the result. | |
5 | ||
6 | % Written by Thomas P Minka | |
7 | % (c) Microsoft Corporation. All rights reserved. | |
8 | ||
9 | sz = size(x); | |
10 | for i=1:length(dim) | |
11 | x = max(x, [], dim(i)); | |
12 | end | |
13 | x = mysqueeze(x); | |
14 | addflops(2*(prod(sz)-prod(size(x)))); |
Note: See TracBrowser
for help on using the repository browser.