这是一个包含三个级别的for循环,用于三个数组:
u in userdim=(67 133 200)
i in itemdim=(78 156 234)
t in tagdim=(50 100 150).
matlab -nodesktop -nosplash -r "matlab_function('folderA/txtFile1.txt','folderB/txtFile[${userdim[${u}]} ${itemdim[${i}]} ${tagdim[${t}]}].txt',[${userdim[${u]} ${itemdim[${i}]} ${tagdim[${t}]}],2)"
# echo "u=$[${u}+1]; i=${i}; t=${t}"
结果是
line 24: unexpected EOF while looking for matching `"'
line 30: syntax error: unexpected end of file
" matlab是否有问题......"线?特别是用单引号?
答案 0 :(得分:0)
这不是一个有效的for循环 - 只是为了告诉我们你的数组的值是什么?无论如何,你的matlab行确实有错误:
[${userdim[${u]} ${itemdim[${i}]} ${tagdim[${t}]}]
应该是:
[${userdim[${u}]} ${itemdim[${i}]} ${tagdim[${t}]}]