引入引用
实例化
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "";
ceshiNative.ceshi dsd = new ceshiNative.ceshi();
var obj = dsd.ceshi1(1);
double[,] arr = obj[0] as double[,];
for (int i = 0; i < arr.Length; i++)
{
textBox1.Text += arr[0, i].ToString() + "\r\n";
}
}
}
}
效果
备注
低版本的Matlab对 Win10 .net4.0以上版本支持不好,建议使用低版本.net RCT。