source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/mysqueeze.m
@
177
Last change on this file since 177 was 37, checked in by , 15 years ago | |
---|---|
File size: 244 bytes |
Line | |
---|---|
1 | function x = mysqueeze(x) |
2 | % Like squeeze(x), but row vectors become columns. |
3 | |
4 | % Written by Thomas P Minka |
5 | |
6 | s = size(x); |
7 | dim = find(s==1); |
8 | if ~isempty(dim) |
9 | s(dim) = []; |
10 | % [1 1] handles special cases |
11 | x = reshape(x,[s 1 1]); |
12 | end |
Note: See TracBrowser
for help on using the repository browser.