str2struct

版本 1.0.0.2 (2.7 KB) 作者: Emmanuel Farhi
Create a structure from a string
69.0 次下载
更新 2019/2/5

查看许可证

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'

引用格式

Emmanuel Farhi (2026). str2struct (https://ww2.mathworks.cn/matlabcentral/fileexchange/59176-str2struct), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息
标签 添加标签
版本 已发布 发行说明
1.0.0.2

updated m-file

1.0.0.1

return unmodified input when not convertible.

1.0.0.0