How to call a mexw64 function?

Hi.
I am trying to run a script in matlab which calls a mexw64 function. I have read previous questions regarding this issue, but I still cannot find a way to call it properly.
I have the following error:
Undefined variable "function" or class "function.mexw64"
What I have tried is the following:
The mexw64 function is in the same folder as the script where is being called.
I have matlab2018 and MS Windows (both of them 64 bits) and the MinGW64 Compiler
Please... Any suggestion to solve this problem?

9 件のコメント

Rik
Rik 2019 年 5 月 27 日
Is the mex file already compiled? (i.e. do you already have the .mexw64 file)
Walter Roberson
Walter Roberson 2019 年 5 月 27 日
If it is already compiled, then just refer to the name without the .mexw64 . For example if you had a MadHatter.mexw64 then your could would just invoke MadHatter(with appropriate arguments)
Hugo Huerta
Hugo Huerta 2019 年 5 月 28 日
編集済み: Hugo Huerta 2019 年 5 月 28 日
Hi. Yes, I have already my file:
andorsdk3functions.mexw64
and also i am calling it from my script as a normal function.
init = andorsdk3functions('AT_InitialiseLibrary');
Rik
Rik 2019 年 5 月 28 日
Not sure if it is a typo, but you mex file name and the function name are not the same: the latter contains a 3 in the middle.
Hugo Huerta
Hugo Huerta 2019 年 5 月 28 日
Yes, it was a typo, It was missing the 3 when I wrote the comment.
They are correct in my code. Thanks.
James Tursa
James Tursa 2019 年 5 月 28 日
Can you see the function from the command line:
which andorsdk3functions -all
Then type the following at the MATLAB command line:
dbstop if error
Then run your code. When the error occurs, figure out why your code cannot see your function. E.g., what does this show now:
which andorsdk3functions -all
Hugo Huerta
Hugo Huerta 2019 年 5 月 29 日
Hi.
This is what I get:
>> which andorsdk3functions -all
'andorsdk3functions' not found.
SS.PNG
Walter Roberson
Walter Roberson 2019 年 5 月 29 日
First I recommend that you look in the File Exchange for File Association Fix.
After that I would suggest that in MATLAB you command
rehash
If there is still a problem after that then a dll needed by the mexw64 might be missing.
James Tursa
James Tursa 2019 年 5 月 29 日
You could also check for unprintable characters in the file name. E.g.,
d = dir;
dname = {d.name};
ismember('andorsdk3functions.mexw64',dname)

サインインしてコメントする。

回答 (0 件)

製品

リリース

R2018a

タグ

質問済み:

2019 年 5 月 27 日

コメント済み:

2019 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by