I followed instructions at:
The module built with no warnings and no errors.
However, when I call the program: !testFeval.exe
No output is produced. No errors and no warnings still.

 채택된 답변

檮杌
檮杌 2023년 10월 5일

1 개 추천

Would you run MATLAB as administrator and see if it works for you?

댓글 수: 6

I just logged on and will try to run as administrator and will then update comments.
Thank you very much for verifying the behavior.
I started up Matlab 2023b as Administrator.
...
>> !testFeval.exe
>>
As you can see, there is still no output.
檮杌
檮杌 2023년 10월 5일
Are you sure you have set up the runtime environment as described in the doc?
I have created a number of mex related files that have run just fine and product the expected output.
The "testFeval.exe" was created just fine with no errors/warnings.
However, when I followed your advice and added C:\Program Files\MATLAB\R2023b\extern\bin\win64
to end of System variable "Path".
I now get the desired result:
>> !testFeval.exe
Square root of -2 is 0 + 1.41421i
Square root of 2 is 1.41421 + 0i
Square root of 6 is 2.44949 + 0i
Square root of 8 is 2.82843 + 0i
>>
I do not understand why I was able to create mex files and got the expected results.
What is different about about this command? Is there a short answer or a document you could send me a link to that will explain why I needed to add this to the path and why the normal installation script did not automatically modify the path?
Thank you very much for your help.
OK, I now see where the instructions say to modify the "path" variable.
I wonder why the install software does not automatically do this for you.
Thanks again.
This solves my problem...
檮杌
檮杌 2023년 10월 6일
This may be related how the function system works (or bang operator, "!"). In general, adding a specific path to PATH instructs OS which folder to refer in order to run commands. However, it is not allowed to look inside the MATLAB function system. Hence, we do not know exactly why we need to add the path but we can only follow the instruction by MW DEV.
Moreover, running mex has nothing much to do with system. I believe they are separately designed. If you do not want to add the path to PATH, you can open the exe file in your cmd. This should work too.
Please accept the answer if it helped. Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품

릴리스

R2023b

질문:

2023년 10월 4일

댓글:

2023년 10월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by