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

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

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
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일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

질문:

2014년 3월 24일

편집:

2021년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by