C# 如何接受matlab返回的多个参数

解决方案 »

  1.   

    参考
    小例子:(提取matlab返回的两个参数并转化为C#的矩阵)Code             testz.testzclass st = new testz.testzclass();             MWArray[] max = st.testz(2);             MWNumericArray x1 = (MWNumericArray)max[0];             MWNumericArray x2 = (MWNumericArray)max[1];             double[,] location1 = (double[,])x1.ToArray(MWArrayComponent.Real);             double[,] location2 = (double[,])x2.ToArray(MWArrayComponent.Real);             label1.Text = location1[1,2].ToString();