How to pass large Arrays into a dotnet library via Matlab?
Mostra commenti meno recenti
I am calling a dot net function which works in C# directly but just doesnt work via matlab. I am thinking matlab internally converts something when I pass large data. Note that in the dotnet code the Array that is passed is internally converted inplace. i.e Arr when passed into the function and when returned are different. Arr will be converted by the function and I think this is causing the issue. It would be helpful if you can guide me to resolve this issue.
In the below code if nsamples is a large number like 1000. Then when I create an array and pass the result is

% Result of the above code when nsamples is large number like 1000
No method 'FrequencyCalibration' with matching signature found for class
'xxx.CalculationContext'.
% result when I use nsamples a very small number
methods(ctx, '-full')
[uint32 scalar RetVal, System.Double[] p] FrequencyCalibration(xxx.CalculationContext this, int32 scalar numt, System.Double[] p)
p =
10 20 30 40 50
ctx.FrequencyCalibration(2,2*p)
ans =
uint32
524288
The above code directly works in C# just fails to work in Matlab. It would be helpful if someone can guide me in resolving this issue.
thank you for your time.
with regards,
Kartik
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!