存储多个.NET阵列(Matlab) [英] Storing Multiple .NET Arrays (Matlab)

查看:66
本文介绍了存储多个.NET阵列(Matlab)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将.NET数组存储在矩阵中而不将其转换为另一种数据类型?

How can I store .NET arrays in a matrix without converting them to another data type?

如果我有

A = NET.createArray('System.Int16', n);
B = NET.createArray('System.Int16', n);

如何将它们存储在相同的矩阵中,而无需先将它们转换为其他数据类型,例如doubleint16

How to do I store these in the same matrix without first converting them to another data type such as double or int16 etc

所以我可以通过以下方式访问它们

So I can access them by

data(1) outputs A
data(2) outputs B

这是一个与我的原始问题有关的更具体的问题: 推荐答案

似乎将.NET数组存储在单元格中意味着您以后可以提取它并对其进行索引

It seems that storing the .NET array in a cell means you can later extract it and index as such

data{1} = NET.createArray('System.Int16', n);
data{2} = NET.createArray('System.Int16', n);

data {i}返回一个.NET数组,该数组可以转换为另一种数据类型并绘制

data{i} returns a .NET array which can be converted to another data type and plotted

这篇关于存储多个.NET阵列(Matlab)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆