My variables are stored as Var1 and Var2 in my MAT file. My goal is to write a loop so that I can read them out one at a time. Why doesn’t the below work?
using MAT; F1 = matopen("Path1/File1.mat"); for i ∈ ["Var1", "Var2", ...]; A = read(F1, $(i)); end close(F1);
This surely work though.
A = read(F1, "Var1");
Isn’t $(1) = “Var1”?