root.document
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | root.document [2010/07/06 04:48] (current) – created jochen | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== root.Document ====== | ||
+ | ===== Motivation ===== | ||
+ | The reason why I wanted this method is to have an additional interface to access already loaded documents (from within scripts) without being given there handles. The method closely works together with the [[root.Documents]] method--please also read this page... | ||
+ | |||
+ | ===== Method reference (' | ||
+ | < | ||
+ | |||
+ | | ||
+ | |||
+ | Input fields: | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | ===== Examples ===== | ||
+ | If you already know that an object by the name '' | ||
+ | |||
+ | <code matlab xff_root_document_ex1.m> | ||
+ | root = xff; | ||
+ | |||
+ | % access document | ||
+ | vmr = root.Document(' | ||
+ | |||
+ | Naturally, in scripts you would rather look this information up: | ||
+ | |||
+ | <code matlab xff_root_document_ex2.m> | ||
+ | root = xff; | ||
+ | |||
+ | % get all documents | ||
+ | docs = root.Documents; | ||
+ | |||
+ | % iterate until found | ||
+ | colin_brain = []; | ||
+ | for dc = 1: | ||
+ | if ischar(docs{dc}) && ... | ||
+ | | ||
+ | colin_brain = root.Document(docs{dc}); | ||
+ | break; | ||
+ | end | ||
+ | end | ||
+ | |||
+ | % load anyway | ||
+ | if isempty(colin_brain) | ||
+ | colin_brain = neuroelf_file(' | ||
+ | end</ |
root.document.txt · Last modified: 2010/07/06 04:48 by jochen