To run 'mexw32' from a script.

15 ビュー (過去 30 日間)
Amit Kalhapure
Amit Kalhapure 2012 年 9 月 21 日
Hi, I want to run '*.mexw32' file from a matlab script(*.m). What is the command to do it?

採用された回答

Wayne King
Wayne King 2012 年 9 月 21 日
編集済み: Wayne King 2012 年 9 月 21 日
Hopefully you're on the correct machine for the mex file, but you just call the function without the mexw32 extension.
out = functioname(a,b);
You have to make sure the mex file is on the MATLAB path. Use addpath() or pathtool to add the folder with the mex file
For example, if you have the Signal Processing Toolbox, levinson() is a mex file. Enter:
>>which levinson
but to call it in a script or from the command line, you just use it like a MATLAB function.
  2 件のコメント
Andreas Goser
Andreas Goser 2012 年 9 月 21 日
Addendum: With "correct machine" Wayne means MEXW32 is for Windows 32 Bit architectures only. See MEXEXT for other extensions.
Amit Kalhapure
Amit Kalhapure 2012 年 9 月 21 日
Thanks for answering. You are right, function should be called without extension. Now the code is working properly. Thanks again.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by