Hello recently i am trying get the result using matlab function and matlab function can return double array like image but and then I got that double by object class in C# but I could not convert to double that object class some one could help me
I have solved this problem
MLApp.MLApp matlab = new MLApp.MLApp();
matlab.Execute(@"Path");
object result = null;
matlab.Feval("RemoveShadow", 1, out result, 12, 13);
var res = (result as object[]).Select(x => (double[,])x).ToArray();
object im = res.GetValue(0);
double[,] d = (double[,])im;
I have solved this problem
if all are double in object array than, alternative to above answer
double[] resultArray = Array.ConvertAll<object, double>
(inputArray, x => (double)x);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With