I want to import input data defined in GAMS to MATLAB. I first generate a gdx file of input data (an example file attached), then, I use rgdx function in MATLAB to read sets, scalars and parameters stored in the gdx file. Although I do not have any problem with linking GAMS and MATLAB, the file imported to MATLAB does not have similar indices as what I have defined in GAMS. For example, you can use the gdx file that I attached and run the following code in MATLAB to see U does not have similar indices as what I have defined in GAMS.
Code: Select all
U.name = 'U'; U = rgdx('Data', U); U = U.val;
Thanks in advance!