outselect.m

버전 1.0.0.0 (1.51 KB) 작성자: Toby Driscoll
Select or reorder any function's output arguments.
다운로드 수: 1.4K
업데이트 날짜: 2005/6/27

라이선스 보기

Occasionally you need only the kth output argument of a MATLAB function, where k>1. This function OUTSELECT provides this facility as a 'wrapper' around any other function. It can evaluate and return arguments immediately, or create a new callable function.

For example:
>> str = 'deacb'; [s,idx] = sort(str)
s =
abcde

idx =
3 5 4 1 2

>> [idx,s] = outselect([2 1],@sort,str)
idx =
3 5 4 1 2

s =
abcde

>> argmin = outselect(2,@min);
>> argmin(str)

ans =
3

인용 양식

Toby Driscoll (2024). outselect.m (https://www.mathworks.com/matlabcentral/fileexchange/7913-outselect-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0