フィルターのクリア

How can I save an object that contains linked lists in MATLAB?

1 回表示 (過去 30 日間)
Siddharth
Siddharth 2011 年 1 月 12 日
コメント済み: André Rieder 2021 年 6 月 12 日
I am trying to save an object which has several fields, one of which is a linked list. Since in the linked list nodes are connected one after another and typically I have to count the number of nodes connected when saving it, I do not know exactly how to store all the connected nodes in the linked list in the saved object.

回答 (1 件)

Prabhakar
Prabhakar 2011 年 1 月 13 日
The three MATLAB files in the resolution documents demonstrate how to save (singly) linked lists without overriding the SAVEOBJ function: Main.m: a class that organizes a singly linked list and other data Node.m: a class that represents nodes in a singly linked list Test.m: a script that adds nodes, saves a singly linked list to a MATLAB file, and loads the MATLAB file.
Try looking up the documentation for these files.
  1 件のコメント
André Rieder
André Rieder 2021 年 6 月 12 日
Where do I find these files?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by