<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://tsgdoc.socsci.ru.nl/index.php?action=history&amp;feed=atom&amp;title=BrainStreamPathsFolders</id>
	<title>BrainStreamPathsFolders - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://tsgdoc.socsci.ru.nl/index.php?action=history&amp;feed=atom&amp;title=BrainStreamPathsFolders"/>
	<link rel="alternate" type="text/html" href="http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;action=history"/>
	<updated>2026-06-14T12:54:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;diff=4568&amp;oldid=prev</id>
		<title>Wiki-admin: /* Adding folders to the search path */</title>
		<link rel="alternate" type="text/html" href="http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;diff=4568&amp;oldid=prev"/>
		<updated>2018-09-26T08:10:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Adding folders to the search path&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:10, 26 September 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then execute this function at the BS_INIT marker:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then execute this function at the BS_INIT marker:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;border&lt;/del&gt;=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/ins&gt;=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wikitable&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!colspan=&amp;quot;3&amp;quot;| '''Actions Table'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!colspan=&amp;quot;3&amp;quot;| '''Actions Table'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Wiki-admin</name></author>
	</entry>
	<entry>
		<id>http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;diff=4523&amp;oldid=prev</id>
		<title>Wiki-admin at 13:36, 21 September 2018</title>
		<link rel="alternate" type="text/html" href="http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;diff=4523&amp;oldid=prev"/>
		<updated>2018-09-21T13:36:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:36, 21 September 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Adding folders to the search path ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Adding folders to the search path ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At startup, BrainStream adds the BrainStream core folder and nearly all its subfolders to the search path. If you need additional files or folders, you must make sure they are added to the search path. It is possible to specify these folders in the block file under the keys [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.DocsSectionsBlockFile&lt;/del&gt;#TopicExperiment MatlabPathFnc] or [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.DocsSectionsBlockFile&lt;/del&gt;#TopicExperiment MatlabPathAdd]. Alternatively, you can use Matlab's &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/addpath.htmlAddpath|http://www.mathworks.nl/help/techdoc/ref/addpath.html addpath]]&amp;lt;/tt&amp;gt; function to add individual folders. If you want to add a folder with all its subfolders, use addpath in combination with &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/genpath.htmlGenpath|http://www.mathworks.nl/help/techdoc/ref/genpath.html genpath]]&amp;lt;/tt&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At startup, BrainStream adds the BrainStream core folder and nearly all its subfolders to the search path. If you need additional files or folders, you must make sure they are added to the search path. It is possible to specify these folders in the block file under the keys [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[BrainStreamBlockFile&lt;/ins&gt;#TopicExperiment&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&lt;/ins&gt;MatlabPathFnc&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;] or [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[BrainStreamBlockFile&lt;/ins&gt;#TopicExperiment&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&lt;/ins&gt;MatlabPathAdd&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]. Alternatively, you can use Matlab's &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/addpath.htmlAddpath|http://www.mathworks.nl/help/techdoc/ref/addpath.html addpath]]&amp;lt;/tt&amp;gt; function to add individual folders. If you want to add a folder with all its subfolders, use addpath in combination with &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/genpath.htmlGenpath|http://www.mathworks.nl/help/techdoc/ref/genpath.html genpath]]&amp;lt;/tt&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;addpath(pwd);          %adds the current working directory to the search path&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;addpath(pwd);          %adds the current working directory to the search path&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;addpath(genpath(pwd)); %adds the current working directory and all its subfolders to the search path  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;addpath(genpath(pwd)); %adds the current working directory and all its subfolders to the search path  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is recommended to use relative path names when you specify a folder, whether it is in the blocksettings or in functions like &amp;lt;tt&amp;gt;addpath&amp;lt;/tt&amp;gt;. This means that you specify the path name of the folder you want to add relative to a folder of which the location is already known. The advantage of using relative path names is that the proper folders will be added also if you work on a different computer.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is recommended to use relative path names when you specify a folder, whether it is in the blocksettings or in functions like &amp;lt;tt&amp;gt;addpath&amp;lt;/tt&amp;gt;. This means that you specify the path name of the folder you want to add relative to a folder of which the location is already known. The advantage of using relative path names is that the proper folders will be added also if you work on a different computer.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In BrainStream, you can make use of the &amp;lt;tt&amp;gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.DocsSectionsProgrmmersGuide&lt;/del&gt;#bs_folder bs_folder]&amp;lt;/tt&amp;gt; function. For example, with input argument 'BLOCK', the output of this function is the path to the folder containing the block file of the experiment. If the block file is located in '/Volumes/BCI/my_bci/blockfile', and you want to add a folder which contains your functions and is located in '/Volumes/BCI/my_bci/functions', you can specify this folder like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In BrainStream, you can make use of the &amp;lt;tt&amp;gt;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[BrainStreamProgrmmersGuide&lt;/ins&gt;#bs_folder&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&lt;/ins&gt;bs_folder&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&amp;lt;/tt&amp;gt; function. For example, with input argument 'BLOCK', the output of this function is the path to the folder containing the block file of the experiment. If the block file is located in '/Volumes/BCI/my_bci/blockfile', and you want to add a folder which contains your functions and is located in '/Volumes/BCI/my_bci/functions', you can specify this folder like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;functionfolder = fullfile(bs_folder('BLOCK'),..,'functions') % N.B. the '..' expression means going up one level&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;functionfolder = fullfile(bs_folder('BLOCK'),..,'functions') % N.B. the '..' expression means going up one level&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Output folders ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Output folders ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;BrainStream saves output in the folder specified in the [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.DocsSectionsBuildingExperiments&lt;/del&gt;#SecBlock block file] under topic Files and key [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.DocsSectionsBlockFile&lt;/del&gt;#KeyOutFolder OutFolder].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;BrainStream saves output in the folder specified in the [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[BrainStreamBuildingExperiments&lt;/ins&gt;#SecBlock&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&lt;/ins&gt;block file&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;] under topic Files and key [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[BrainStreamBlockFile&lt;/ins&gt;#KeyOutFolder&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&lt;/ins&gt;OutFolder&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The output folder contains:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The output folder contains:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot; &gt;Line 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.DocsSectionsLogFile &lt;/del&gt;log file]: gives an overview of everything that happened during your experiment.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[BrainStreamLogFile|&lt;/ins&gt;log file&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]: gives an overview of everything that happened during your experiment.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;brainstream folder: contains copies of the user defined variables that have been saved with a 'save' statement in the Actions table.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;brainstream folder: contains copies of the user defined variables that have been saved with a 'save' statement in the Actions table.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Wiki-admin</name></author>
	</entry>
	<entry>
		<id>http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;diff=4510&amp;oldid=prev</id>
		<title>Wiki-admin: Created page with &quot;&lt;!---Start1---&gt; = Paths and Folders = __TOC__ All files (e.g. functions or figures) and folders that are used in your experiment must be on the Http://www.mathworks.nl/help/...&quot;</title>
		<link rel="alternate" type="text/html" href="http://tsgdoc.socsci.ru.nl/index.php?title=BrainStreamPathsFolders&amp;diff=4510&amp;oldid=prev"/>
		<updated>2018-09-21T11:57:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;!---Start1---&amp;gt; = Paths and Folders = __TOC__ All files (e.g. functions or figures) and folders that are used in your experiment must be on the Http://www.mathworks.nl/help/...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!---Start1---&amp;gt;&lt;br /&gt;
= Paths and Folders =&lt;br /&gt;
__TOC__&lt;br /&gt;
All files (e.g. functions or figures) and folders that are used in your experiment must be on the [[Http://www.mathworks.nl/help/techdoc/matlab_env/br7ppws-1.htmlMatlabSearchPath|http://www.mathworks.nl/help/techdoc/matlab_env/br7ppws-1.html Matlab search path]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AddFolders&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Adding folders to the search path ==&lt;br /&gt;
&lt;br /&gt;
At startup, BrainStream adds the BrainStream core folder and nearly all its subfolders to the search path. If you need additional files or folders, you must make sure they are added to the search path. It is possible to specify these folders in the block file under the keys [.DocsSectionsBlockFile#TopicExperiment MatlabPathFnc] or [.DocsSectionsBlockFile#TopicExperiment MatlabPathAdd]. Alternatively, you can use Matlab's &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/addpath.htmlAddpath|http://www.mathworks.nl/help/techdoc/ref/addpath.html addpath]]&amp;lt;/tt&amp;gt; function to add individual folders. If you want to add a folder with all its subfolders, use addpath in combination with &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/genpath.htmlGenpath|http://www.mathworks.nl/help/techdoc/ref/genpath.html genpath]]&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;addpath(pwd);          %adds the current working directory to the search path&lt;br /&gt;
addpath(genpath(pwd)); %adds the current working directory and all its subfolders to the search path &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is often useful to write a user defined function that adds all necessary paths and execute this function at the start of the experiment (e.g. at the BS_INIT marker). For example, if the experiment needs access to functions that are located in the folder /Volumes/BCI/my_functions, you could make a function:&lt;br /&gt;
&amp;lt;pre&amp;gt;function event = add_folder(event)&lt;br /&gt;
addpath(fullfile('Volumes','BCI','my_functions')); % add my_functions folder to the Matlab search path&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then execute this function at the BS_INIT marker:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;| '''Actions Table'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;strong&amp;gt; marker&amp;lt;/strong&amp;gt; || &amp;lt;strong&amp;gt;time &amp;lt;br /&amp;gt;&amp;lt;/strong&amp;gt; || &amp;lt;strong&amp;gt;function &amp;lt;br /&amp;gt;&amp;lt;/strong&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| BS_INIT || EVENT || add_folder &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tip: Use the fullfile function ===&lt;br /&gt;
&lt;br /&gt;
It is recommended to use Matlab's &amp;lt;tt&amp;gt;[[Http://www.mathworks.nl/help/techdoc/ref/fullfile.htmlFullfile|http://www.mathworks.nl/help/techdoc/ref/fullfile.html fullfile]]&amp;lt;/tt&amp;gt; function when you specify a file or folder. This ensures that the proper folders will be added on computers with different operating systems, as different systems may use either '/' or '\' as a file separator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;RelativePath&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Tip: Use relative path names ===&lt;br /&gt;
&lt;br /&gt;
It is recommended to use relative path names when you specify a folder, whether it is in the blocksettings or in functions like &amp;lt;tt&amp;gt;addpath&amp;lt;/tt&amp;gt;. This means that you specify the path name of the folder you want to add relative to a folder of which the location is already known. The advantage of using relative path names is that the proper folders will be added also if you work on a different computer.&lt;br /&gt;
&lt;br /&gt;
In BrainStream, you can make use of the &amp;lt;tt&amp;gt;[.DocsSectionsProgrmmersGuide#bs_folder bs_folder]&amp;lt;/tt&amp;gt; function. For example, with input argument 'BLOCK', the output of this function is the path to the folder containing the block file of the experiment. If the block file is located in '/Volumes/BCI/my_bci/blockfile', and you want to add a folder which contains your functions and is located in '/Volumes/BCI/my_bci/functions', you can specify this folder like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;functionfolder = fullfile(bs_folder('BLOCK'),..,'functions') % N.B. the '..' expression means going up one level&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;OutputFolder&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output folders ==&lt;br /&gt;
&lt;br /&gt;
BrainStream saves output in the folder specified in the [.DocsSectionsBuildingExperiments#SecBlock block file] under topic Files and key [.DocsSectionsBlockFile#KeyOutFolder OutFolder].&lt;br /&gt;
&lt;br /&gt;
The output folder contains:&lt;br /&gt;
&lt;br /&gt;
'''subject folders''': a separate folder is created for each new subject. The folder has the subject's name.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''session folders''': a separate folder is created for each session with the same subject. The folder's name is the date of the session (YYYYMMDD).&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This folder contains the most recently saved version of user defined variables. This is the folder where BrainStream looks for variables when a 'load' statement is specified in the Actions table.&lt;br /&gt;
&lt;br /&gt;
'''run folders''': a separate runfolder is created for each block within the experiment. The name of the folder is the name of the block followed by _ and a number indicating how many times this block has been repeated. Each runfolder contains:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''module folders:''' Each module stores its results in a separate folder named accordingly. [[BrainStream|Brain Stream]] always stores its result in the 'main' module. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[.DocsSectionsLogFile log file]: gives an overview of everything that happened during your experiment.&lt;br /&gt;
&lt;br /&gt;
brainstream folder: contains copies of the user defined variables that have been saved with a 'save' statement in the Actions table.&lt;br /&gt;
&lt;br /&gt;
expdefs folder: contains copies of the experiment definition tables and blocksettings.&lt;br /&gt;
&lt;br /&gt;
raw_bdf folder: contains the raw EEG data.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---End1---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* Access control &lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wiki-admin</name></author>
	</entry>
</feed>