'Too many ouput arguments' error when trying to obtain an MWArray from .dll function in C#.

2 ビュー (過去 30 日間)
I am receiving the error message 'Too many ouput arguments' from my function in C# after using the library compiler to use my matlab function in C#. The line that is producing the error looks like this:
MWArray[] result2 = magicmod.mymagic(b);
I am expecting to receive an MWArray from my function (which is very simple so I don't think it is anything going wrong inside the function). 'b' is just an integer that is being fed in to the function.

採用された回答

Owen Bevan
Owen Bevan 2020 年 6 月 29 日
Found the solution, the input to the function wasn't in the form MWNumericArray, I was just putting an integer in. Despite the error code it was actually the input that was the issue not the output.

その他の回答 (1 件)

Shojiro SHIBAYAMA
Shojiro SHIBAYAMA 2020 年 6 月 29 日
First, I recommend you to check the datatype of the output of the `magicmod.mymagic`. Or, you should just show us how the original function works on MATLAB.
Second, if `magicmod.mymagic` returns an integer, the array does not seem to be fit to the output of the function on C#.
  1 件のコメント
Owen Bevan
Owen Bevan 2020 年 6 月 29 日
Thanks, the input b was the problem (not in MWNumericArray format).

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

カテゴリ

Help Center および File ExchangeDeploy to C++ Applications Using mwArray API (C++03) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by