fRMField

버전 1.0.0.0 (7.27 KB) 작성자: Jan
Remove a field from a struct efficiently - fast C-Mex
다운로드 수: 927
업데이트 날짜: 2010/8/20

라이선스 보기

fRMField: Remove field(s) from a struct - fast C-MEX
This function is about 5 to 10 times faster than RMFIELD of Matlab 2009a.

T = fRMField(S, Name)
INPUT:
S: Struct or struct array.
Name: String or cell string. Removing a name, which is not a field name
of S, is *not* an error here, in opposite to Matlab's RMFIELD.
OUTPUT:
T: Struct S without the removed fields.

EXAMPLES:
S.A = 1; S.B = 2;
T = fRMField(S, {'B', 'C'}); % >> T.A = 1
T = fRMField(S, 'A'); % >> T.B = 2

TEST: Run TestfRMField to check validity and speed of the Mex function. See screenshot.

Tested: Matlab 6.5/2009a, WinXP 32bit, LCC2.4/3.8, BCC5.5, OpenWatcom1.8, MSVC2008
Compatibility to Linux, MacOS, 64bit, 2010a is assumed.

인용 양식

Jan (2024). fRMField (https://www.mathworks.com/matlabcentral/fileexchange/28517-frmfield), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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