using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MathWorks.MATLAB.NET.Arrays;//在MWArray.dll,最常用的
using MathWorks.MATLAB.NET.Utility;// 在MWArray.dll,最常用的
using erfc;//这个就是我们自己定义的,里面有matlab函数
namespace erfccc
{
class Program
{
static void Main(string[] args)
{
erfc.Myclass E = new Myclass();
Console.WriteLine("输入x的值:");
int x = Convert.ToInt32(Console.ReadLine());
MWArray[] result = E.erfc(1,(MWArray)x); //第一个参数取决于你的erfc有几个返回参数
MWNumericArray r1 = (MWNumericArray)result [0];
double[,] location1 = (double[,])r1.ToArray(MWArrayComponent.Real);
Console.WriteLine(location1 [0,0].ToString());
}
}
}