Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



how to refer to the data from other m.files
Posted:
Jan 16, 2014 10:34 AM


Dear all,
I am coding the economic model in Matlab and I have two cases with and without treatment. Two codes with two cases are saved as treat1.m and treat2.m, respectively. The I am trying to calculate the difference for variable (i,t) in treat2.m as the difference var*(i,t)  var (i,t), where var*(i,t) is the variable (an array) from the file treat1.m. I tried to use the function load as S = load(filename,myVars{:})
but received the following error message
Error using load Number of columns on line 5 of ASCII file.
Thank you in advance!
Svetlana



