<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Datenum performance	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/datenum-performance/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/datenum-performance?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=datenum-performance</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Wed, 13 Jul 2016 18:02:51 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: David		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-382912</link>

		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Wed, 13 Jul 2016 18:02:51 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-382912</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/datenum-performance#comment-381175&quot;&gt;David Long&lt;/a&gt;.

Yair, sorry for the late response and sorry for your previous experience dealing with APL. Not sure what happened but APL usually has very nice people. On my question and the paid consultation issue...I would if I could but I&#039;m just a engineer and that is way above my pay grade. Anyway, thanks so much.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/datenum-performance#comment-381175">David Long</a>.</p>
<p>Yair, sorry for the late response and sorry for your previous experience dealing with APL. Not sure what happened but APL usually has very nice people. On my question and the paid consultation issue&#8230;I would if I could but I&#8217;m just a engineer and that is way above my pay grade. Anyway, thanks so much.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-381251</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 24 Jun 2016 12:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-381251</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/datenum-performance#comment-381175&quot;&gt;David Long&lt;/a&gt;.

@David - there is indeed an answer to this but I make it a personal point not to answer any pro-bono questions from JHU-APL following a few cases in previous years where I felt that my goodwill was taken advantage of by your peers. If you want a professional answer to your question then email me for a paid consulting request.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/datenum-performance#comment-381175">David Long</a>.</p>
<p>@David &#8211; there is indeed an answer to this but I make it a personal point not to answer any pro-bono questions from JHU-APL following a few cases in previous years where I felt that my goodwill was taken advantage of by your peers. If you want a professional answer to your question then email me for a paid consulting request.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Long		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-381175</link>

		<dc:creator><![CDATA[David Long]]></dc:creator>
		<pubDate>Thu, 23 Jun 2016 19:41:42 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-381175</guid>

					<description><![CDATA[Yair, Thanks so much on this. I have a particular problem that using dtstr2dtnummx doesn&#039;t solve, and I was wondering if you knew of a simple fix. You are correct that dtstr2dtnummx is much faster but if you need milliseconds, this doesn&#039;t seem to catch that. For instance, using your code above but adding milliseconds to the time string gives two different results.
&lt;pre lang=&quot;matlab&quot;&gt;
tic, 
for i=1:1000 
    dateNum=dtstr2dtnummx({&#039;2010-12-12 12:21:12.123&#039;},&#039;yyyy-MM-dd HH:mm:ss.FFF&#039;);
end; 
dateNum
toc

dateNum =
          734484.514722222

Elapsed time is 0.099181 seconds.
 
% Slower - using datenum
tic
for i=1:1000 
    dateNum=datenum({&#039;2010-12-12 12:21:12.123&#039;},&#039;yyyy-mm-dd HH:MM:SS.FFF&#039;);
end; 
dateNum
toc

dateNum =
          734484.514723646

Elapsed time is 0.172265 seconds.
&lt;/pre&gt;
The difference is the added millisecond value. Even adding the &quot;.FFF&quot; to the format string doesn&#039;t seem to catch the milliseconds in the faster case. This must happen outside of the dtstr2dtnummx function.]]></description>
			<content:encoded><![CDATA[<p>Yair, Thanks so much on this. I have a particular problem that using dtstr2dtnummx doesn&#8217;t solve, and I was wondering if you knew of a simple fix. You are correct that dtstr2dtnummx is much faster but if you need milliseconds, this doesn&#8217;t seem to catch that. For instance, using your code above but adding milliseconds to the time string gives two different results.</p>
<pre lang="matlab">
tic, 
for i=1:1000 
    dateNum=dtstr2dtnummx({'2010-12-12 12:21:12.123'},'yyyy-MM-dd HH:mm:ss.FFF');
end; 
dateNum
toc

dateNum =
          734484.514722222

Elapsed time is 0.099181 seconds.
 
% Slower - using datenum
tic
for i=1:1000 
    dateNum=datenum({'2010-12-12 12:21:12.123'},'yyyy-mm-dd HH:MM:SS.FFF');
end; 
dateNum
toc

dateNum =
          734484.514723646

Elapsed time is 0.172265 seconds.
</pre>
<p>The difference is the added millisecond value. Even adding the &#8220;.FFF&#8221; to the format string doesn&#8217;t seem to catch the milliseconds in the faster case. This must happen outside of the dtstr2dtnummx function.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-347445</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 02 Apr 2015 09:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-347445</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/datenum-performance#comment-347443&quot;&gt;Phillip&lt;/a&gt;.

&lt;pre lang=&#039;matlab&#039;&gt;which dtstr2dtnummx &lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/datenum-performance#comment-347443">Phillip</a>.</p>
<pre lang='matlab'>which dtstr2dtnummx </pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Phillip		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-347443</link>

		<dc:creator><![CDATA[Phillip]]></dc:creator>
		<pubDate>Thu, 02 Apr 2015 09:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-347443</guid>

					<description><![CDATA[Hi

Any idea where dtstr2dtnummx has disappeared to in the newer versions. Can&#039;t find it in 2015a, for example. I know it&#039;s there because I can call it but for the life of me I can&#039;t find it.

Regards,
Phil]]></description>
			<content:encoded><![CDATA[<p>Hi</p>
<p>Any idea where dtstr2dtnummx has disappeared to in the newer versions. Can&#8217;t find it in 2015a, for example. I know it&#8217;s there because I can call it but for the life of me I can&#8217;t find it.</p>
<p>Regards,<br />
Phil</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JakubT		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-323872</link>

		<dc:creator><![CDATA[JakubT]]></dc:creator>
		<pubDate>Tue, 29 Apr 2014 08:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-323872</guid>

					<description><![CDATA[Hello,
Mathworks seem to have done some black magic - when I used older Matlab (2011), datenum conversion of a time vector (2.1*10^6 entries) with a given format took 600+ seconds. With DTSTR2DTNUMMX, it took 220 s. In Matlab 2013, it takes 28s only and seems to give a correct answer too!
Best,
Jakub]]></description>
			<content:encoded><![CDATA[<p>Hello,<br />
Mathworks seem to have done some black magic &#8211; when I used older Matlab (2011), datenum conversion of a time vector (2.1*10^6 entries) with a given format took 600+ seconds. With DTSTR2DTNUMMX, it took 220 s. In Matlab 2013, it takes 28s only and seems to give a correct answer too!<br />
Best,<br />
Jakub</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sprintfc &#8211; undocumented helper function &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-299745</link>

		<dc:creator><![CDATA[sprintfc &#8211; undocumented helper function &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Wed, 27 Nov 2013 20:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-299745</guid>

					<description><![CDATA[[...] was the case, for example, of the ismembc function, that I described here back in 2009, and the dtstr2dtnummx function that I described in 2011. Today I describe another such function, sprintfc, based on a tip I [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] was the case, for example, of the ismembc function, that I described here back in 2009, and the dtstr2dtnummx function that I described in 2011. Today I describe another such function, sprintfc, based on a tip I [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: datestr performance &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-58732</link>

		<dc:creator><![CDATA[datestr performance &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Wed, 05 Oct 2011 20:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-58732</guid>

					<description><![CDATA[[...] A few months ago, I posted an article showing how we can use some internal help functions to significantly improve the performance [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] A few months ago, I posted an article showing how we can use some internal help functions to significantly improve the performance [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Teegee		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-43265</link>

		<dc:creator><![CDATA[Teegee]]></dc:creator>
		<pubDate>Wed, 11 May 2011 13:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-43265</guid>

					<description><![CDATA[I have another Tip for such processing. For given vectors, it could save a huge amount of time:

You want to compute the vector A and become the results in the variable Result:

&lt;pre lang=&#039;matlab&#039;&gt;Result=datestr(A); % To avoid&lt;/pre&gt;

Use the unique function before: 

&lt;pre lang=&#039;matlab&#039;&gt;
[b, m, n] = unique(A); % Reduce your vector A
b=datestr(b); % Apply your function to b which is much smaller
Result=b(n,:); % Assign it to a vector the same size as A
&lt;/pre&gt;

For a vector A with a lot of same values it saved my life :-)]]></description>
			<content:encoded><![CDATA[<p>I have another Tip for such processing. For given vectors, it could save a huge amount of time:</p>
<p>You want to compute the vector A and become the results in the variable Result:</p>
<pre lang='matlab'>Result=datestr(A); % To avoid</pre>
<p>Use the unique function before: </p>
<pre lang='matlab'>
[b, m, n] = unique(A); % Reduce your vector A
b=datestr(b); % Apply your function to b which is much smaller
Result=b(n,:); % Assign it to a vector the same size as A
</pre>
<p>For a vector A with a lot of same values it saved my life 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/datenum-performance#comment-43259</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 11 May 2011 10:20:43 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2299#comment-43259</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/datenum-performance#comment-43249&quot;&gt;Jan Simon&lt;/a&gt;.

DATENUMMX is still available in the latest Matlab release (R2011a)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/datenum-performance#comment-43249">Jan Simon</a>.</p>
<p>DATENUMMX is still available in the latest Matlab release (R2011a)</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
