<?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=GetRunOrder</id>
	<title>GetRunOrder - 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=GetRunOrder"/>
	<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunOrder&amp;action=history"/>
	<updated>2026-04-13T08:02:59Z</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=GetRunOrder&amp;diff=782&amp;oldid=prev</id>
		<title>Chris at 20:54, 29 September 2016</title>
		<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunOrder&amp;diff=782&amp;oldid=prev"/>
		<updated>2016-09-29T20:54:10Z</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:54, 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; 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the event that participants were run on several stimulus lists presented in a non-sequential order that has been since forgotten, the MATLAB function getRunOrder.m can recover the order in which a set of experimental data .mat files were created&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;based on the timestamp field. This sequence it returned in the generated report value.&lt;/div&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;In the event that participants were run on several stimulus lists presented in a non-sequential order that has been since forgotten, the MATLAB function getRunOrder.m can recover the order in which a set of experimental data .mat files were created based on the timestamp field. This sequence it returned in the generated report value.&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 report=getRunOrder(matfiles)&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 report=getRunOrder(matfiles)&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=GetRunOrder&amp;diff=781&amp;oldid=prev</id>
		<title>Chris: Created page with &quot;In the event that participants were run on several stimulus lists presented in a non-sequential order that has been since forgotten, the MATLAB function getRunOrder.m can reco...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ccn-wiki.caset.buffalo.edu/index.php?title=GetRunOrder&amp;diff=781&amp;oldid=prev"/>
		<updated>2016-09-29T20:50:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In the event that participants were run on several stimulus lists presented in a non-sequential order that has been since forgotten, the MATLAB function getRunOrder.m can reco...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In the event that participants were run on several stimulus lists presented in a non-sequential order that has been since forgotten, the MATLAB function getRunOrder.m can recover the order in which a set of experimental data .mat files were created, based on the timestamp field. This sequence it returned in the generated report value.&lt;br /&gt;
&lt;br /&gt;
 function report=getRunOrder(matfiles)&lt;br /&gt;
 %Ensure that we know the names of the files to open&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;
 datafiles=cellfun(@(x) load(x), matfiles);&lt;br /&gt;
 &lt;br /&gt;
 timestamps=cell(1,length(datafiles));&lt;br /&gt;
 &lt;br /&gt;
 %for each of the data files&lt;br /&gt;
 for i=1:length(datafiles)&lt;br /&gt;
    d=datafiles(i); %open each data file&lt;br /&gt;
    timestamps{i}=d.expinfo.starttime; %extract the start timestamp&lt;br /&gt;
 &lt;br /&gt;
 %determine which stim list matches the stims appearing in the data file&lt;br /&gt;
 end&lt;br /&gt;
 [sorted,tsidx]=sort(todatenum(cdfepoch(timestamps)));&lt;br /&gt;
 %after sorting the timestamps, tsidx has the order in which the datafiles&lt;br /&gt;
 %were generated. Can be used to report the filenames in sorted order:&lt;br /&gt;
 %matfiles(tsidx)&lt;br /&gt;
 report.matfiles=matfiles(tsidx)&amp;#039;;&lt;br /&gt;
 report.timestamps=timestamps&amp;#039;;&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[Category: MATLAB functions]]&lt;/div&gt;</summary>
		<author><name>Chris</name></author>
	</entry>
</feed>