Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Tree data structure in MatLab
Date: Sat, 12 Dec 2009 08:44:03 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 9
Message-ID: <hfvl4j$rki$1@fred.mathworks.com>
References: <hckg5o$8t6$1@fred.mathworks.com> <8a4fce74-3a2a-4374-9c8b-083de5bb8db5@n35g2000yqm.googlegroups.com> <hfune3$pba$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1260607443 28306 172.30.248.35 (12 Dec 2009 08:44:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 12 Dec 2009 08:44:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:592172


I would argue a CELL having nested cells having nested cells etc ... are tree. The different is inserting or removal a branch/element is a costly operation (since Matlab does not provide a notion of pointers). 

This data structure can be also represented by STRUCT with nested STRUCT.

I believe there are several FEX tools that do conversion back and forth between XML and STRUCT. I have used one of those and it works OK for my need, which do not do any intensive tree manipulation.

But yes, basically, there is nothing exactly match TREE in Matlab.

Bruno