MATLAB中的可增长数据结构 [英] Growable data structure in MATLAB

查看:78
本文介绍了MATLAB中的可增长数据结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在matlab中创建一个队列,该队列包含非常大的结构.我不知道这个队列会有多大. Matlab没有链表,我担心重复分配和复制会减慢此代码的运行速度,因为该代码必须运行数千次.我需要某种方式来使用可增长的数据结构.我在matlab帮助中找到了几个链接列表条目,但我不知道发生了什么.有人可以帮我解决这个问题吗?

I need to create a queue in matlab that holds structs which are very large. I don't know how large this queue will get. Matlab doesn't have linked lists, and I'm worried that repeated allocation and copying is really going to slow down this code which must be run thousands of times. I need some sort of way to use a growable data structure. I've found a couple of entries for linked lists in the matlab help but I can't understand what's going on. Can someone help me with this problem?

推荐答案

好吧,我找到了简单的答案:

Well, I found the easy answer:

L = java.util.LinkedList;

这篇关于MATLAB中的可增长数据结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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