Undefined function 'wgdx' for input arguments of type 'struct'

19 次查看(过去 30 天)
Hi,
I tried to safe a 3d array as gdx file. I got the following error message though:
Undefined function 'wgdx' for input arguments of type 'struct'
Do you have any idea how to fix that?
Thank you so much!
  2 个评论
Andrej
Andrej 2017-2-9
I see it's a bit old post. But it maybe usefull to some people that get the same problem.
The answer to the problem is that you need to add GAMS path to Environmental Path in Windows, but to also add GAMS to Matlab Path. Just take a look at the video on the link bellow, it is explained how to do it: https://youtu.be/HPn_q8nlktE
Eric Ela
Eric Ela 2018-4-1
I saw this error when searching for something I had encountered and am wondering if any Matlab/gams interface users may help me on a similar error. I have GAMS path on environment variables and on the matlab set path. I used to have no issues. I have code that continuously writes and reads GDX files from Matlab. What happens is every so often I receive the error:
Error using wgdx Could not open gdx file with gdxOpenWrite:
This seems to now happen at random. After the error occurs I run the line from the command window and it works no problem. Any idea as to why this fails at random? Any help much appreciated.

请先登录,再进行评论。

回答(1 个)

mohammed alwaely
mohammed alwaely 2021-4-2
编辑:mohammed alwaely 2021-4-2
Hi
You should add the Gams Path to your Matlab first.
Open Matlab >> Home tab >> Sep Path >> add folder
you can choise your gams path folder >>click Select folder >> Save.
done! for more info check this video

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by