Question

It is a for loop with three levels, for three arrays:

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}"

Its result is

line 24: unexpected EOF while looking for matching `"'

line 30: syntax error: unexpected end of file

Is there something wrong with the "matlab..." line? Especially with the single quotation marks?

Was it helpful?

Solution

That's not a valid for loop - is that just to show us what the values of your arrays are? Regardless, your matlab line does have an error:

[${userdim[${u]} ${itemdim[${i}]} ${tagdim[${t}]}]

Should be:

[${userdim[${u}]} ${itemdim[${i}]} ${tagdim[${t}]}]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top