Basically, I need the data in the screenshot in ArrayImplHandle; specifically ArrayTpye and Dimensions. So I know it exists but I can't find the functions to retrieve it.
How to get dimensions of MATLABArray using MATLABEngine with .NET
3 ビュー (過去 30 日間)
古いコメントを表示
When using a MathWorks.MATLAB.Types.MATLABArray, how do you get the dimensions of the array? I cannot find any properties that expose it.
5 件のコメント
Michael VanMeter
2024 年 6 月 4 日
編集済み: Michael VanMeter
2024 年 6 月 4 日
As you pointed out there are no public members exposed for the information you seek. Why are you trying to operate on the MATLABArray class and not converting to a native .NET type?
using MathWorks.MATLAB.Engine;
using (dynamic matlab = MATLABEngine.StartMATLAB())
{
double[,] results = matlab.magic(5.0);
int rows = results.GetLength(0);
int cols = results.GetLength(1);
}
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!