Thursday, October 25, 2012

Tuesday, October 2, 2012

PDFlatex when submitting to journal servers

If you are using PDFLaTeX for your paper, and want to submit it to EES servers of Elsevier (for Pattern Recognition or other journals), you need to put these 5 lines at the beginning of your LaTeX file:

%&pdflatex

\documentclass[review,preprint,12pt]{elsarticle}
% \biboptions{sort&compress} % natbib is loaded by default
\pdfoutput=1
\pdfoptionpdfminorversion=5%

The first line is commented but will be used. The third line can be uncommented, if you want the references be sorted according to their appearance in the paper.

And, it is important that these line do not go beyond the first-5 lines of the file.

Thursday, September 27, 2012

Error using fit Too many input arguments. (How to solve)

The problem was that fit.m function of the Matlab Curvefit toolbox was shadowed by the other fit.m functions of the other Matlab toolboxes. Here, there is a solution with minimal intervention (no filename or no on-the-fly path correction is required). A new function handle is assigned to the fit.m function of the Matlab Curvefit toolbox. The solution is based on the discussions in the links below, and the credit goes to the contributors to those discussions.

The solution:

% first locate the correct fit.m of the Matlab Curvefit toolbox 
current_pwd = pwd;
cd([[matlabroot, '\toolbox\curvefit\curvefit']])
exist('fit', 'file');
org_curvefit_fit = str2func('fit');

cd(current_pwd)
% use it
CDF_for_fit = fittype('a*(x-b)');
paramhat = org_curvefit_fit(t_0, CDF_empirical, CDF_for_fit, ...
    'StartPoint', [5.6, 1.5], 'Lower', [0, 0], 'Robust', 'LAR');



Links:

http://www.mathworks.com/matlabcentral/newsreader/view_thread/264354

http://www.mathworks.com/matlabcentral/answers/208
FOR loops, Basic syntax

http://www.robvanderwoude.com/for.php

Wednesday, September 5, 2012

"SpellCheckPlus" is a grammar checker that finds common spelling errors and grammatical mistakes in English.

http://spellcheckplus.com/

Wednesday, August 22, 2012

Wednesday, June 20, 2012

Run a Matlab code in the background

Have you wanted to run a Matlab code in the background? Below is the solution I use.

This is the command I use:

matlab -nodisplay < PASCAL_VOC2011_apply_NLPM2_nointerface.m > output_PASCAL_VOC2011_apply_NLPM2.txt &

And inside PASCAL_VOC2011_apply_NLPM2_nointerface.m, I have a call to the main function:

addpathalt
PASCAL_VOC2011_apply_NLPM2

where
addpathalt contains addpath(s) to my toolboxes, and
PASCAL_VOC2011_apply_NLPM2.m is the main function that I want to run.

Friday, January 27, 2012

Rainmeter: It can display customizable skins, like memory and battery power, RSS feeds and weather forecasts, right on the desktop. I used it to add a qoute to my desktop.

http://rainmeter.net/cms/

http://www.howtogeek.com/howto/35980/how-to-display-a-quote-on-your-desktop-using-rainmeter/
CamStudio: Free Streaming Video Software

http://camstudio.org/

Resolving "Out of Memory" Errors - Matlab

Resolving "Out of Memory" Errors - Matlab

http://www.mathworks.com/help/techdoc/matlab_prog/brh72ex-49.html

Windows Vista and Windows 7 (32bit):

BCDEdit /set increaseuserva 3072
 
(In case of problem, you can revert it using:
BCDEdit /deletevalue increaseuserva
 )

You can run it as administrator using the "sudo cmd.exe". See the following post:

http://www.msfn.org/board/topic/142153-sudo-equivalent-for-windows-vista7/

----

Backup copy of sudo post above:

1. sudo.cmd:


@echo Set objShell = CreateObject("Shell.Application") > %temp%\sudo.tmp.vbs@echo args = Right("%*", (Len("%*") - Len("%1"))) >> %temp%\sudo.tmp.vbs@echo objShell.ShellExecute "%1", args, "", "runas" >> %temp%\sudo.tmp.vbs@cscript %temp%\sudo.tmp.vbs


2.

sudo cmd.exe




 
 
 

Wednesday, January 25, 2012

Convertcase: lowercase to uppercase, etc

It is a handy tool to convert a phrase from all uppercase to lowercase online. It has many options to choose.

http://www.convertcase.net/

Saturday, January 21, 2012

getlinkinfo: Expand tiny url/bit.ly URLs

A nice service to enable expanding tiny url/bit.ly URLs to get and retrieve the original URL. It also provides a preview of the web page:

http://www.getlinkinfo.com/

Monday, January 16, 2012

Tuesday, January 10, 2012

Solving the bibtex problem with underscores in DOI

Have you had problem with compiling Latex files when there was an underscore in the DOI number of one of citations. Usually, it ends up with an error similar to this:

! Missing $ inserted.
<inserted text>
                $
l.286   {\path{doi:10.1001/001-1-11-111-1_11}}


The solution is to call the underscore package:

\usepackage[strings]{underscore}

For more inrformation on this package, see its help:

http://ctan.mackichan.com/macros/latex/contrib/underscore/underscore.pdf