s-functionのプロセスリリースについて/ how to release the process of s-function

4 visualizzazioni (ultimi 30 giorni)
Visual Studioでmexw64を作成しております。
ただ、mexw64をVisual studioで作成した後、Simulinkで実行し、また再度Visual studioでビルドすると、"mexw64を開くことができません"というエラーが発生してしまいます。
おそらく、matlab側でmexw64をつかんでいるみたいで、ファイルにアクセスできないようです。
削除しようとしても、"matlab R2021a によってファイルは開かれているため、操作を完了できません。ファイルを閉じてから再実行してください"とメッセージが出ます。
matlab自体を閉じれば、再ビルドできるのですが、効率が非常に悪いです。
matlab コマンドプロンプト上で、mex コマンドを実施すれば、プロセスは放してくれるのですが、
今、開発している環境がVisual studioなので、mex コマンドで実施するため、いちいち、ソースを変更しながらビルドをかけないといけません。
たしか、このプロセス?(matlabがs-functionをつかんで離さない)を切断するコマンドがあったと思うのですが、
そのコマンドを教えていただけませんか?(忘れてしまった。。。かなりマニアックなはず。ドキュメンテーションにも載っていない。。。)
I am creating a mexw64 in Visual Studio.
However, after creating mexw64 in Visual studio, I run it in Simulink, and when I build it again in Visual studio, I get an error saying "mexw64 cannot be opened".
It seems that matlab is grabbing mexw64 and cannot access the file.
When I try to delete the file, I get the error "The file has been opened by matlab R2021a and the operation cannot be completed. Please close the file and rerun.
If I close matlab itself, I can rebuild, but it is very inefficient.
If I run the mex command on the matlab command prompt, the process is released.
However, the environment in which I am developing now is Visual studio, so I have to use the mex command, so I have to build while changing the source code every time.
I think there is a command to disconnect this process (matlab grabs the s-function and won't let go).
Could you please tell me that command? (I forgot it.... (I forget...it must be pretty geeky...not even in the documentation. It's not even in the documentation...)

Risposta accettata

Toshinobu Shintai
Toshinobu Shintai il 18 Ott 2022
切断するコマンドは以下です。
clear functions

Più risposte (0)

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!