Monday, April 18, 2011

Open Firefox web browser in Matlab Mac

Wanted to open a web browser from Matlab.
This works for Firefox. Similar things should do for chrome... Lets see.


webDIR = '/Applications/Firefox.app/Contents/MacOS/firefox';
system([webDIR, ' www.usefulcodes.blogspot.com'])

OR,
open -a Firefox
Consulting
http://www.google.com/support/forum/p/Chrome/thread?tid=68ef8a58f86e1fe2&hl=en

But not working for chrome.


Getting Started with MATLAB: A Quick Introduction for Scientists and EngineersDigital Image Processing Using MATLAB, 2nd ed. 

Thursday, April 7, 2011

Code Box for Blogger

Thanks to
http://www.tutzone.org/2009/04/professional-code-box-for-bloggers.html
I have new code block for code section

CODE GOES HERE

Making matlab avi Video with ordered file list


Easy way to display the month-year as string.
Which can then be used to prepare a video out of the file list.


video_obj = VideoWriter('rotation2.avi');
video_obj.FrameRate = 1;

open(video_obj)
months={'Jan','Feb','Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'};
for iyear=5: 9

year_st = num2str(iyear,'%2.2i');
for i=1:length(months)
fn=[months{i} '_' year_st '.fig'];
disp(fn)
Figtitle = strrep(fn,'_','');

set(gca,'FontSize',30);
eval(sprintf('title(''%s'',''FontSize'',[28],''FontWeight'',''bold'')',Figtitle));
pause(0.1)
F = getframe(fig);
writeVideo(video_obj,F);
pause(0.5)
end
close(video_obj);

end

Friday, April 1, 2011

L, One and I in programming scripts


l1I Courier
l1I Tribuchet
l1I Arial
l1I Helvetica

l1I Times

How many times you have stumbled because of these great bad designs of the fonts?
What is your default font for writing codes?
l1I