keepfield

Keep specified fields of a structure, discarding other fields.

Sie verfolgen jetzt diese Einreichung

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.

Zitieren als

Brett Shoelson (2026). keepfield (https://de.mathworks.com/matlabcentral/fileexchange/7031-keepfield), MATLAB Central File Exchange. Abgerufen .

Quellenangaben

Inspiriert von: keep

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.0.0.0