#!/bin/bash

mat_filename="FCTN_approx"
matlab_script_dir="/home/tnLLM"
results_dir="${matlab_script_dir}/results"

for parse_rank1 in $1; do
    for parse_rank2 in $2; do
        for parse_rank3 in $3; do 
            for parse_rank4 in $4; do
                for parse_rank5 in $5; do
                    for parse_rank6 in $6; do
                        parse_rank="${parse_rank1}_${parse_rank2}_${parse_rank3}_${parse_rank4}_${parse_rank5}_${parse_rank6}"
                
                        matlab -nosplash -nodisplay -r "cd('${matlab_script_dir}'); mat_filename='${mat_filename}'; matlab_script_dir = '${matlab_script_dir}'; parse_rank = '${parse_rank}'; parse_rank1=${parse_rank1}; parse_rank2=${parse_rank2}; parse_rank3=${parse_rank3}; parse_rank4=${parse_rank4}; parse_rank5=${parse_rank5}; parse_rank6=${parse_rank6};  parse_rank='${parse_rank}'; run('FCTN_appro_traintest_split_video'); exit" > ${matlab_script_dir}/results/${mat_filename}_${parse_rank}.txt
                    done
                done
            done
        done
    done
done