Create a structure from a string

63 descargas

Actualizado 5 Feb 2019

Ver licencia

This function creates a structure from string containing <name> <value> pairs.
Structure member must be separated by ';' or end-of-lines.
The member assignation can be specified with spaces, '=' and ':'

input arguments:
string: string from which the structure should be extracted. It can
also be a file name, which is then read.

output variables:
s: structure which contains the named values

>> str=str2struct('Temperature: 200; RV=3; comment something nice');
str =
Temperature: 200
RV: 3
comment: 'something nice'

Citar como

Emmanuel Farhi (2023). str2struct (, MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Más información sobre Characters and Strings en Help Center y MATLAB Answers.
Etiquetas Añadir etiquetas

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión

updated m-file

return unmodified input when not convertible.