How to store graphs (undirected) i cell array and retrieve them

4 次查看(过去 30 天)
I am writting an algorithm based on graph. In the process I am creating and modifying undirected graphs. It is mostly performed in the for loop so I thought I can store them in cell array like this:
graphCellArray(i) = {myGraph};
The problem appears when I want to retrieve it from graphCellArray. How can I do it ? Or maybe I should use some other methods?

采纳的回答

Yongjian Feng
Yongjian Feng 2022-1-20
You meant:
graphCellArray = {g1, g2, g3};
graphCellArray{1} % access the first one

更多回答(1 个)

Arek
Arek 2022-1-20
Yesss, thank you :)

类别

Help CenterFile Exchange 中查找有关 Undirected Graphs 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by