help with the Matlab-C++ interface

In the attempt to re-create the analysis that others created a while ago, the MATLAB program stops because it calls the function ‘cluster5’ which is not an .m file but a file with extension .mexsol which Matlab does not recognize (in other words there is NOT 'cluster.m' but only 'cluster.mexsol' in my directory). My questions are: 1) Is there a way to make this cluster5.mexsol work properly in Matlab in a Windows environment? It seems to work when I call it from Unix. 2) If not is there anything that I can do to make it work on WIndows?I am not an expert of how Matlab and C communicate with each other… Any comment and suggestion will be highly appreciated.

回答 (2 件)

José-Luis
José-Luis 2013 年 1 月 12 日

1 投票

  1. No
  2. Solaris is a flavor of UNIX, so that's probably why it works
  3. Yes, please save yourself a world of hurt and recompile the mex source in a windows system.
To use C++ code in Matlab, please look here.
To use Matlab in C++ code, please look here.

1 件のコメント

Walter Roberson
Walter Roberson 2013 年 1 月 12 日
There would be large difficulties in getting the .mexsol to work in an MS Windows environment. It is probably not even compiled for an Intel architecture at all.

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

Giampaolo
Giampaolo 2013 年 1 月 12 日

0 投票

Thanks Jose. You are suggesting to get hold of the original 'cluster.c' source file (which I don't have) and to compile it using mex. Is this correct?

1 件のコメント

José-Luis
José-Luis 2013 年 1 月 12 日
編集済み: José-Luis 2013 年 1 月 12 日
Yes.
Please don't place comments as answers, it might get confusing for other people joining the conversation down the road. Please accept an answer if it helped you. You might want to wait to see if anyone else has something else to contribute though, as the answer I gave is, I should have added, "to the best of my knowledge".

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

カテゴリ

ヘルプ センター および File ExchangeCall C++ from MATLAB についてさらに検索

タグ

質問済み:

2013 年 1 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by