Okay, now I see what you wanted to do. Do you realize why the suggestion worked?
To use LsqFit you need to provide a number (N) of observations. In your case, the observations are chosen by you: you want to sample a the full tensor grid defined by two (in this case) vectors. Then you have to consider each combination/point as one observation. This obviously means that some a
s are going to be repeated for some t
s and vice versa. This is the part I didn’t understand when you said “why do a and t have to be of the same length” - well because you need N pairs!