Matlab 如何将结构转换为hdf5格式并使用倍频程保存
我的代码中有一个struct值。我需要转换成h5格式。我试图以这种方式使用倍频程保存方法:Matlab 如何将结构转换为hdf5格式并使用倍频程保存,matlab,octave,Matlab,Octave,我的代码中有一个struct值。我需要转换成h5格式。我试图以这种方式使用倍频程保存方法: s = save ("-hdf5","train.h5","-struct","startloc") 其中,train.h5是我要保存它的文件,startoc是包含两个键值的struct类型的变量 startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]); 当我尝试运行它时,我得到了错误 错误:赋值右侧的值未定义 h5文件
s = save ("-hdf5","train.h5","-struct","startloc")
其中,train.h5是我要保存它的文件,startoc是包含两个键值的struct类型的变量
startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]);
当我尝试运行它时,我得到了错误
错误:赋值右侧的值未定义
h5文件正在创建中,但it无法找到STARTOC,因为它认为它可能是字符串。但是save命令的语法不允许传递参数时不带引号。我在octave doc中搜索了很多,但没有找到 你做得对
这似乎是一个倍频程错误:save()
函数没有返回任何内容
所以不要捕捉它的输出
totalct = 2;
startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]);
save ("-hdf5", "train.h5", "-struct", "startloc")
如果您关心此行为,请将其作为错误报告给。您做得对
这似乎是一个倍频程错误:save()
函数没有返回任何内容
所以不要捕捉它的输出
totalct = 2;
startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]);
save ("-hdf5", "train.h5", "-struct", "startloc")
如果您关心此行为,请将其作为错误报告给