How to store graphs (undirected) i cell array and retrieve them
조회 수: 8 (최근 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?
댓글 수: 0
채택된 답변
Yongjian Feng
2022년 1월 20일
You meant:
graphCellArray = {g1, g2, g3};
graphCellArray{1} % access the first one
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Undirected Graphs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!