-4
我有一个函数:MATLAB:通过电池参数
function myFunc(myStruct)
% file can contains one or a list of files
file = {fullfile(pwd,myStruct.name)}
end
从另一个文件,当我打电话myFunc的
myStruct.name = {'toto','titi','tata'}
myFunc(myStruct);
I got an error ,function isn't definied for cell
,我想传递给现场myStruct.name字符串或字符串列表: 我的意思是myStruct.name可以接受一个参数“TOTO”或参数列表{“TOTO”,“蒂蒂”}
当
我该怎么做?
谢谢
你想如何处理该列表的功能?它会返回什么? –
我只想说myStruct.name可以访问一个字符串或一个字符串列表 – lola
但是“接受”它做什么?例如,一个空函数将接受任何东西作为它的输入! –