Page 6 of 7
Matlab for Beginners
Posted: Wed Jun 16, 2010 8:57 am
by urnash
I know it's a small threadjack but: earlier in this thread we discussed the speed of R vs Matlab. I've just found http://www.cybaea.net/Blogs/Data/Faster-R-through-better-BLAS.html which describes different ways of speeding up R. Hope this helps someone...
Matlab for Beginners
Posted: Tue Jul 06, 2010 4:05 pm
by Maggette
Actually I don't really need it right now, but thanks for the link. This sounds interesting and is good to know it exists. Thanks
Matlab for Beginners
Posted: Wed Jul 07, 2010 10:04 am
by Praetorian
Another note on R Performance: For Intel Machines the fastest solution is to link against Intel MKL. Revolution R gives you optimized Builds out of the box under windows. For Linux Users a Revolution version is available for Ubuntu (but only R2.9.2). A general installation tutorial for Linux can be found at: http://psyccomputing.blogspot.com/2010/04/compiling-64-bit-r-2101-with-mkl-in.html - i used that to speed up my Amazon Cloud Environment.
Matlab for Beginners
Posted: Wed Sep 26, 2012 9:19 pm
by taa
Hi all
I need a (1xN) vector of dates in the following format "yyyymmdd" (i.e. 19960101) for a for-loop.
start_date = datenum('01-Jan-1996');
end_date = datenum('31-Dec-2012');
date = datevec(start_date:1:end_date);
How should I proceed?
Thx for your help!!
Matlab for Beginners
Posted: Wed Sep 26, 2012 9:53 pm
by djfostner
If you're looking to get the data into a vector of formatted strings you could use the built-in datestr command.
dateString = datestr(date,'yyyymmdd');
Hope that helps.
Matlab for Beginners
Posted: Wed Sep 26, 2012 10:00 pm
by taa
Thx for that, djfostner.
Unfortunately, I had this before and I dont know how to access/use the first, second etc. value in dateString.
Afterwards I would like to use sprintf in a for-loop to combine a hyperlink with the date in the above mentioned vector.
Thx again
Matlab for Beginners
Posted: Wed Sep 26, 2012 10:10 pm
by silverside
in approximate order of complexity (and reverse order of speed):
use a for loop with datestr()
or
use cellfun()
or
use a custom-written loop using preallocated strings for numbers from 1 to 12, 1 to 31, and 0 to 99. date-related functions in matlab are notoriously slow.
Matlab for Beginners
Posted: Fri Dec 14, 2012 5:22 pm
by tabris
Ok this might be a real basic question but I am unsure of how to do this.
I would like to set my machine timezone from matlab to another timezone whilst running a script in matlab and then convert it back. How would I do this actually or is this possible?
Matlab for Beginners
Posted: Fri Dec 14, 2012 6:49 pm
by tristanreid
I can give you a script that will do this, but may I ask: is this for string formatting purposes? There may be better alternatives. If for no other reason, you're going to mess up your calendar if you keep switching back and forth - any invite that gets received during this time has high probability of getting jacked.
Here's a Matlab example of converting local to UTC, although you're going to need Java installed for this to run (and CLASSPATH set in Matlab)
http://www.mathworks.com/matlabcentral/fileexchange/22295-localtimetoutc/content/local_time_to_utc.m
Matlab for Beginners
Posted: Sat Dec 15, 2012 4:10 am
by tabris
Thanks! And no it is not for date formating, I actually have to call an executable file that requires my timezone as an input and I cannot recompile this file since I do not have the source code.
Don't worry I do not have many invites so this patch work will do!