how to chekc if a node is present in a tree or not?
조회 수: 5 (최근 30일)
이전 댓글 표시
clc;
clear all;
tr=tree('root');
[tr,NYT1]=tr.addnode(1,'0');
[tr,n1]=tr.addnode(1,'node1');
I am trying to check if node1 is present in 'tr' tree or not? I tried to use and 'isfield' they don't seem to work. Here is how I used them
isfield(tr.Node,'node(1).data')
it does not seem to recognize its presence, can anyone help? thanks.
댓글 수: 1
Geoff Hayes
2016년 9월 5일
Samuel - is the tree class (?) something that you have written, is built-in to MATLAB, or from the File Exchange? Please provide a reference to this code.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!