我正在尝试创建3个从大型词库(种群)生成的随机词表(样本)。我使用算法和软件pkg SOS(http://sos.cnbc.cmu.edu/index.html)作为用户界面(GUI)和MATLAB来编写要在SOS中运行的脚本。 到目前为止,我可以使用SOS创建总体,但是无法创建样本。该脚本生成一个空的.txt文件。我不太清楚为什么。
1)我已将示例链接到MATLAB脚本中的总体,如下所示,但是仍在创建空白txt文件。
2)我尝试使用GUI手动创建示例,但由于出现以下错误而无法执行。
1)这是创建样本,然后将样本链接到总体的代码:
% Create samples (conditions)
sample1 = sample(p.nsampcnt1, 'name', 'sample1', ...
'outFile', ['test1_1' p.optmethod '.txt']);
sample2 = sample(p.nsampcnt2, 'name', 'sample2', ...
'outFile', ['test1_2' p.optmethod '.txt']);
% Link samples to population
sample1.setPop(Pop1);
sample2.setPop(Pop1);
2)这是我尝试手动创建样本时遇到的错误:
??? Error using ==>
sample>sample.sample at 160
Sample Constructor: Pre-loaded
sample size cannot be larger than
target sample size {n}.
我不确定要更改样本大小(n)的位置。我已经检查了脚本中错误所涉及的行,但是在n <样本大小的情况下,它向我显示了错误的文本。
对于此询问是否有点含糊,我深表歉意,因为SOS软件包中有许多脚本显示错误。将它们全部复制到这里将是一场噩梦。 任何帮助将不胜感激!