フィルターのクリア

Using NET assembly from within MATLAB

1 回表示 (過去 30 日間)
Conrad
Conrad 2012 年 6 月 15 日
Hi, I am trying to pass a cell array containing strings and doubles to a NET method that takes a System.Object array as input but get an error. According to the documentation, http://www.mathworks.com/help/techdoc/matlab_external/brpb5o9-1.html#bs20zhq, this should be possible.
Any ideas?
Regards
----------------- Full details: ----------------
-----C# code
namespace BulkUploadUtility
{
public static class BulkUpload
{
public static System.Object[] Data;
public static void UploadData(System.Object[] data)
{
Data = data;
}
}
}
----MATLAB
asm = NET.addAssembly('BulkUploadUtility.dll');
a= {'a','1';'b','2'};
BulkUploadUtility.BulkUpload.UploadData(a)
gives the error: ??? No method 'UploadData' with matching signature found for class 'BulkUploadUtility.BulkUpload'.

採用された回答

Titus Edelhofer
Titus Edelhofer 2012 年 6 月 15 日
Hi,
I'm not sure, but as a first simple test to rule this out, try to send a 1D array: you are sending a 2D array to a 1D (System.Object[]) array. Does it work for
a = {'a' '1' 'b' '2'};
?
Titus
  4 件のコメント
Conrad
Conrad 2012 年 6 月 15 日
That is it then....was testing on a machine with R2010b. Will test using R2012a and give feedback.
Thanks!
Conrad
Titus Edelhofer
Titus Edelhofer 2012 年 6 月 16 日
If you like you might mark the question as answered ...

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by