keepfield

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 (2026). keepfield (https://kr.mathworks.com/matlabcentral/fileexchange/7031-keepfield), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 받은 파일: keep

카테고리

Help CenterMATLAB Answers에서 Structures에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0