str2struct

Create a structure from a string
66 téléchargements
Mise à jour 5 fév. 2019

Afficher la licence

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

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

Citation pour cette source

Emmanuel Farhi (2024). str2struct (https://www.mathworks.com/matlabcentral/fileexchange/59176-str2struct), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2010b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Characters and Strings dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.2

updated m-file

1.0.0.1

return unmodified input when not convertible.

1.0.0.0