About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconRenameField (Scripts) Publisher's description

RenameField - Rename a fields of a struct

RenameField - Rename a fields of a struct

T = RenameField(S, Old, New)
S: Struct or struct array.
Old: String or cell string, name of the field to be renamed.
New: String or cell string, new field name, which must be a valid Matlab symbol.
T: Struct S with renamed fields.

S.A = 1; S.B = 2;
T = RenameField(S, 'B', 'C'); % >> T.A = 1, T.C = 2

This function was created after a discussion in Loren's blog:

Tested: Matlab 6.5/2009a, WinXP 32 bit, LCC2.4/3.8, BCC5.5, OpemWatcom 1.8, MSVC 2008
Compatibility to 64 bit, Linux, MacOS is assumed.

Look in the C-file for instructions to compile the Mex file at first.
A slower M-version is included, but disabled by a call to ERROR. The M-version does not check the validity of the new names.

System Requirements:

MATLAB 7.8 (R2009a)
Program Release Status: Major Update
Program Install Support: Install and Uninstall

RenameField (Scripts) Tags:

Click on a tag to find related softwares

Is RenameField (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.