keepfield
버전 1.0.0.0 (1.4 KB) 작성자:
Brett Shoelson
Keep specified fields of a structure, discarding other fields.
ML provides a useful function RMFIELD to remove specified field(s) from a structure, but no corresponding function to KEEP specified field(s), removing the rest. This function addresses that discrepancy.
ex.:
a = dir('*.m');
b = keepfield(a,{'name','date'});
This is an exceptionally short but useful piece of code.
인용 양식
Brett Shoelson (2024). keepfield (https://www.mathworks.com/matlabcentral/fileexchange/7031-keepfield), MATLAB Central File Exchange. 검색됨 .
MATLAB 릴리스 호환 정보
개발 환경:
R14SP1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux카테고리
Help Center 및 MATLAB Answers에서 Structures에 대해 자세히 알아보기
태그
도움
받음: keep
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!버전 | 게시됨 | 릴리스 정보 | |
---|---|---|---|
1.0.0.0 |