Download CIFTI_read_save/@xmltree/length.m from cindyhfls/fcMRI-VAE: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/cindyhfls/fcMRI-VAE/resolve/169adeb50aa8b27cbce21032e6b65a2ce6b06bf2/CIFTI_read_save/%40xmltree/length.m
- Command line
-
hf download hf://cindyhfls/fcMRI-VAE@169adeb50aa8b27cbce21032e6b65a2ce6b06bf2/CIFTI_read_save/@xmltree/length.m
-
curl -L -o length.m https://huggingface.co/cindyhfls/fcMRI-VAE/resolve/169adeb50aa8b27cbce21032e6b65a2ce6b06bf2/CIFTI_read_save/%40xmltree/length.m
1.05 kB
| function l = length(tree,r) | |
| % XMLTREE/LENGTH Length Method | |
| % FORMAT l = length(tree,r) | |
| % | |
| % tree - XMLTree object | |
| % r - 'real' if present, returns the real number of nodes in the | |
| % tree (deleted nodes aren't populated) | |
| % l - length of the XML tree (number of nodes) | |
| %__________________________________________________________________________ | |
| % | |
| % Return the number of nodes of an XMLTree object. | |
| %__________________________________________________________________________ | |
| % Copyright (C) 2002-2011 http://www.artefact.tk/ | |
| % Guillaume Flandin | |
| % $Id: length.m 4460 2011-09-05 14:52:16Z guillaume $ | |
| %error(nargchk(1,2,nargin)); | |
| % Return the full number of nodes once allocated | |
| l = length(tree.tree); | |
| % Substract the number of deleted nodes to the previous length | |
| if nargin == 2 | |
| if strcmp(r,'real') | |
| ll = 0; | |
| for i=1:l | |
| if ~strcmp(tree.tree{i}.type,'deleted') | |
| ll = ll + 1; | |
| end | |
| end | |
| l = ll; | |
| else | |
| error('[XMLTree] Bad input argument.'); | |
| end | |
| end | |