annotate sequences/@seq/min.m @ 3:3f77126f7b5f
First major revision of sequence library, now using classdef form, STILL A BIT BROKEN!
author |
samer |
date |
Wed, 09 Jan 2013 22:22:21 +0000 |
parents |
|
children |
b1280319413e |
rev |
line source |
samer@3
|
1
|
samer@3
|
2 % min - min mapped over sequence (ie NOT aggregate)
|
samer@3
|
3 function o=min(A,B,DIM),
|
samer@3
|
4 if nargin==2 && ~isempty(B), o=binfun(A,B,@min@(a,b),sprintf('max(%s,%s)',a,b));
|
samer@3
|
5 else
|
samer@3
|
6 if nargin<3, o=fnseq(@min,A);
|
samer@3
|
7 else o=fnseq(@(x)min(x,[],DIM),A);
|
samer@3
|
8 end
|
samer@3
|
9 end
|
samer@3
|
10 end
|
samer@3
|
11
|