1.返回一个整数

function [ a ] = testReturn( b )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here a = b+;
end
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using MatlabReturn;
namespace MatlabToNet
{
class Program
{
static void Main(string[] args)
{
MWNumericArray input = null;
//MWNumericArray output = null;
MWArray result = null;
ToMatlab matlab = new ToMatlab(); input = ;
result = matlab.testReturn(input);
Console.WriteLine(result); }
}
}

2. 返回两个整数

function [ a , b] = testReturn( c )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here a = c+;
b = c+;
end
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using MatlabReturn;
namespace MatlabToNet
{
class Program
{
static void Main(string[] args)
{
MWNumericArray input = null;
//MWNumericArray output = null;
MWArray[] result = null;
ToMatlab matlab = new ToMatlab(); input = ;
result = matlab.testReturn( ,input);//2表示输出2个值
Console.WriteLine(result[] +":" +result[]); }
}
}

3.返回多个多种类型的值

function [ a , b ,d] = testReturn( c )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here a = length(c);
b = strcat(c,'liu');
d = strcmp(c,'xin');
end
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using MatlabReturn;
namespace MatlabToNet
{
class Program
{
static void Main(string[] args)
{
MWCharArray input = null;
//MWNumericArray output = null;
MWArray[] result = null;
ToMatlab matlab = new ToMatlab(); input = "me";
result = matlab.testReturn( ,input);//2表示输出2个值
Console.WriteLine(result[] +":" +result[]+":"+result[]); }
}
}

最新文章

  1. React的井字过三关(3)
  2. android 选择图片或拍照时旋转了90度问题
  3. Centos 7.0添加yum本地安装源
  4. 在WPF下快速生成线的方法
  5. 用c#实现$.now()(1437813924915)的时间效果
  6. ab测试大并发错误
  7. 如何在IIS7上配置 FTP7并使用IIS管理凭据方式进行验证?
  8. trackr: An AngularJS app with a Java 8 backend – Part I
  9. lightoj1017 dp
  10. asp.net(C#)禁止缓存文件
  11. JSP SMARTUPLOAD组件:上传文件时同时获取表单参数
  12. android 中FragmentActivity中模拟返回键返回上一个Activity效果
  13. 如何查看.Net源代码vs版本号以及C#项目中各文件的含义
  14. gc overhead limit exceeded eclipse错误解决方式
  15. Ubuntu14.04下安装ZendStudio10.6.1+SVN出现Failed to load JavaHL Library
  16. HDU-5157Harry and magic string
  17. Linux的打印rpm包的详细信息的shell脚本
  18. js常用正则表达式表单验证代码
  19. i春秋——Misc之百度杯
  20. linux 之 shell

热门文章

  1. MySQL的ODBC安装错误问题!
  2. How to extract pcd from a rosbag? 如何从rosbag中提取pcd
  3. 【51Nod 1363】最小公倍数之和(欧拉函数)
  4. C++基础学习1: C++布尔类型
  5. atcoder 2579
  6. [HAOI2006]受欢迎的牛 tarjan缩点 BZOJ1051
  7. 牛客国庆集训day5 G 贵族用户 (模拟)
  8. HDU6315 Naive Operations(多校第二场1007)(线段树)
  9. 江西财经大学第一届程序设计竞赛 C
  10. Hive 报错信息及解决方法