<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ccn-wiki.caset.buffalo.edu/index.php?action=history&amp;feed=atom&amp;title=GetRunStimList</id>
	<title>GetRunStimList - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ccn-wiki.caset.buffalo.edu/index.php?action=history&amp;feed=atom&amp;title=GetRunStimList"/>
	<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;action=history"/>
	<updated>2026-04-15T18:06:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;diff=773&amp;oldid=prev</id>
		<title>Chris at 20:34, 29 September 2016</title>
		<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;diff=773&amp;oldid=prev"/>
		<updated>2016-09-29T20:34:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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 16:34, 29 September 2016&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-l34&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;  [~,stimlists,~]=cellfun(@(x) fileparts(x), stimlists, &amp;#039;UniformOutput&amp;#039;, false);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;  [~,stimlists,~]=cellfun(@(x) fileparts(x), stimlists, &amp;#039;UniformOutput&amp;#039;, false);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;  end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;  end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: MATLAB functions]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Chris</name></author>
	</entry>
	<entry>
		<id>https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;diff=772&amp;oldid=prev</id>
		<title>Chris at 20:33, 29 September 2016</title>
		<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;diff=772&amp;oldid=prev"/>
		<updated>2016-09-29T20:33:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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 16:33, 29 September 2016&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;From time to time, we may lose track of which stimuli lists are associated with a particular .mat experimental data file following an experiment. &amp;amp;quot;Did this participant view the List A or List B items?&amp;amp;quot;, you might ask. The following MATLAB function (found in the usual place) takes a set of data file names (.mat) and a set of stimuli files associated with an experiment run using the same PsychToolBox design conventions used for the LDT experiment. The function iterates through each matfile and determines which of the stimuli lists contain the same sequence of items as those recorded in the trial-by-trial data. The variable &amp;#039;&amp;#039;stimlists&amp;#039;&amp;#039; is returned as an N &amp;amp;times 2 cell array of .mat/.txt pairs.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;From time to time, we may lose track of which stimuli lists are associated with a particular .mat experimental data file following an experiment. &amp;amp;quot;Did this participant view the List A or List B items?&amp;amp;quot;, you might ask. The following MATLAB function (found in the usual place) takes a set of data file names (.mat) and a set of stimuli files associated with an experiment run using the same PsychToolBox design conventions used for the LDT experiment. The function iterates through each matfile and determines which of the stimuli lists contain the same sequence of items as those recorded in the trial-by-trial data. The variable &amp;#039;&amp;#039;stimlists&amp;#039;&amp;#039; is returned as an N &amp;amp;times 2 cell array of .mat/.txt pairs.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If no parameters are given, the user is prompted to select the .mat files and/or .txt stimuli files of interest, which is probably the easiest way to go about doing things.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;  function stimlists=getRunStimList(matfiles, lists)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;  function stimlists=getRunStimList(matfiles, lists)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Chris</name></author>
	</entry>
	<entry>
		<id>https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;diff=771&amp;oldid=prev</id>
		<title>Chris: Created page with &quot;From time to time, we may lose track of which stimuli lists are associated with a particular .mat experimental data file following an experiment. &amp;quot;Did this participant vi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunStimList&amp;diff=771&amp;oldid=prev"/>
		<updated>2016-09-29T20:30:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;From time to time, we may lose track of which stimuli lists are associated with a particular .mat experimental data file following an experiment. &amp;quot;Did this participant vi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;From time to time, we may lose track of which stimuli lists are associated with a particular .mat experimental data file following an experiment. &amp;amp;quot;Did this participant view the List A or List B items?&amp;amp;quot;, you might ask. The following MATLAB function (found in the usual place) takes a set of data file names (.mat) and a set of stimuli files associated with an experiment run using the same PsychToolBox design conventions used for the LDT experiment. The function iterates through each matfile and determines which of the stimuli lists contain the same sequence of items as those recorded in the trial-by-trial data. The variable &amp;#039;&amp;#039;stimlists&amp;#039;&amp;#039; is returned as an N &amp;amp;times 2 cell array of .mat/.txt pairs.&lt;br /&gt;
&lt;br /&gt;
 function stimlists=getRunStimList(matfiles, lists)&lt;br /&gt;
 if(~exist(&amp;#039;matfiles&amp;#039;, &amp;#039;var&amp;#039;) || isempty(matfiles))&lt;br /&gt;
    [FileName,PathName,~] = uigetfile(&amp;#039;*.mat&amp;#039;, &amp;#039;Select a .mat data file&amp;#039;,&amp;#039;MultiSelect&amp;#039;, &amp;#039;on&amp;#039;);&lt;br /&gt;
    matfiles=fullfile(PathName, FileName);&lt;br /&gt;
 end&lt;br /&gt;
 if(~exist(&amp;#039;lists&amp;#039;, &amp;#039;var&amp;#039;) || isempty(lists))&lt;br /&gt;
    [FileName,PathName,~] = uigetfile(&amp;#039;*.txt&amp;#039;, &amp;#039;Select stimuli files&amp;#039;,&amp;#039;MultiSelect&amp;#039;, &amp;#039;on&amp;#039;);&lt;br /&gt;
    lists=fullfile(PathName, FileName);&lt;br /&gt;
 end&lt;br /&gt;
 datafiles=cellfun(@(x) load(x), matfiles);&lt;br /&gt;
 &lt;br /&gt;
 %some code to load in the stims from the stimfiles using readtable()&lt;br /&gt;
 stimfiles=cellfun(@(x) readtable(x), lists, &amp;#039;UniformOutput&amp;#039;, false);&lt;br /&gt;
 &lt;br /&gt;
 stimlists=cell(length(matfiles),2); %stimlists will be a nFiles*2 cell array of strings of the format: [matfile | stimfile]&lt;br /&gt;
 &lt;br /&gt;
 for i=1:length(datafiles)&lt;br /&gt;
    d=datafiles(i); %open each data file&lt;br /&gt;
    %determine which stim list matches the stims appearing in the data file&lt;br /&gt;
    stims={d.expinfo.data.stim}&amp;#039;;&lt;br /&gt;
    %iterate through all lists&lt;br /&gt;
    stimlists{i,1}=matfiles{i}; %make note of which matfile we are working on&lt;br /&gt;
    for j=1:length(stimfiles)&lt;br /&gt;
        sf=stimfiles{j};&lt;br /&gt;
        if(isequal(stims, table2cell(sf(:,3))))&lt;br /&gt;
            stimlists{i,2}=lists{j};&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
 [~,stimlists,~]=cellfun(@(x) fileparts(x), stimlists, &amp;#039;UniformOutput&amp;#039;, false);&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>Chris</name></author>
	</entry>
</feed>