c#调用matlab的问题
matlab的程序是这样的:function =test0101(path1,path2,path3)
data1=xlsread(path1);
data2=xlsread(path2);
f1=plot(data1,data2);
figure;
imshow(f1);
imwrite(f1,path3,'bmp')
主要是通过打开两个xls文件的数据由matlab产生一个图像
在c#中调用这个例子的时候部分是这么写的:
private void btn_ok_Click(object sender, EventArgs e)
{
int t, s;
object a, b;
// object j=new object();
MathWorks.MATLAB.NET.Arrays.MWArray j;
j = 0;
string xxx;
//t = Convert.ToInt16(this.textBox1.Text);
//s = Convert.ToInt16(this.textBox2.Text);
int index = xx.IndexOf(".");
string yy = xx.Substring(index, 4);
test1010.test1010class lj = new test1010.test1010class();
MathWorks.MATLAB.NET.Arrays.MWArray m = t;
MathWorks.MATLAB.NET.Arrays.MWArray alpha = s;
// a = t; b = s;
//object filename_1 = null;
//string filename_2 = "c:\\test_01.bmp";
string filename_3 = "c:\\test_2.bmp"; ;
xxx=lj.test0101(1,filename_3).ToString();
// j = 0;
// xyz11.xyz11class lj = new xyz11.xyz11class();
// ObjectJ=lj.xyz_test01(1, 50, 1,j, xx, filename_2, filename_3);
this.pictureBox1.Image = System.Drawing.Image.FromFile(filename_3.ToString());
//this.pictureBox3.Image = System.Drawing.Image.FromFile(filename_3.ToString());
//this.textBox3.Text = j.ToString();
}
想在pictureBox1中显示这个图片,其中部分参数是没有用的
error:No overload for method"test0101"takes"2"arguments
望高手相助!
不甚感激!
页:
[1]