Memming's Inconsistency
Nothing Personal, Yet Subjective
Blog | Guestbook
Keyword | Local | Tag
T 23 / Y 87 / Total 45917
Catergories
Calendar
«   2010/03   »
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Tag
tip, MATLAB, vim, LaTeX, mathematics, Google, Tips, 촛불집회, derivative, conference wsom, theorem, CNEL, correlogram, ocw, equation search engine, algorithm, synchrony, spike train, coupled oscillator, javascript,
Archive
Link
Search
  submit
Recent Articles
Recent Comments
Recent Trackbacks
해당되는 게시물 11건
2009/12/16 12:01
Using nocite and multibib
2009/12/16 12:01 2009/12/16 12:01
When making a CV for yourself in LaTeX, one shall use nocite instead of cite command to make a list of publications. This avoids the problem of hiding citations using some other tricks. But what if you want multiple bibliographies in your document? One for journal articles and one for conference articles?
There's a LaTeX package called multibib. Here's an example:
\usepackage[resetlabels]{multibib}
...
\newcites{journal}{foo}
\bibliographystylejournal{unsrt}
\newcites{conf}{foo}
\bibliographystyleconf{unsrt}
...
Journal
    \nocitejournal{Park2008a}
    \bibliographyjournal{bibfile}
Conference
    \nociteconf{Park2005}
    \bibliographyconf{bibfile}
...
LaTeX will generate separate aux files for each bib, so you'll need to run bibtex for each aux files.
(In this example, bibtex journal and bibtex conf will do.)
TAG : , ,
2009/09/16 08:12
sum(sum(K)) vs o * K * o'
2009/09/16 08:12 2009/09/16 08:12
Simple speed comparison on MATLAB 7.0.4.356
K = randn(100,100);
>> o = ones(1,size(K,1)); tic; for k = 1:10000; o * K * o'; end; toc
Elapsed time is 0.156108 seconds.
>> tic; for k = 1:10000; sum(sum(K)); end; toc
Elapsed time is 0.937100 seconds.
TAG : ,
2009/08/13 11:26 2009/08/13 11:26
This is a versatile and generic method worth memorizing.

ls -d *.JPG | sed -s 's/\(.*\).JPG$/mv"&" "\1.jpg"/'

and when you want to execute it put a pipe to 'sh'

ls -d *.JPG | sed -s 's/\(.*\).JPG$/mv"&" "\1.jpg"/' | sh
2008/11/14 13:01 2008/11/14 13:01
Source: Zdenek http://www.tug.org/pipermail/tex-live/2007-August/014582.html

Sometimes, the LaTeX style files provided by the publisher does things that are not desirable. One of the big hassles is the URL in the bibliography portion. For example, the Elsevier bst file does it. I used to just go into my BiBTeX files and remove all the URL fields (that were automatically included when I exported from websites such as citeUlike)
\bibliographystyle{elsart-harv}

But there's a better solution. It is to modify the bst file directly.
Open the corresponding bst file (in my case elsart-harv.bst), and look for the following function.
FUNCTION {write.url}
{ url empty$
    { skip$ }
    { "\newline\urlprefix\url{" url * "}" * write$ newline$ }
    { "" }
    { "" }
  if$
}
This is where the URL is being output. Change this to
FUNCTION {write.url}
{ url empty$
    { "" }
    { "" }
  if$
}
and you are done!
Make sure to clean the aux files and rerun BiBTeX and LaTeX.
TAG : ,
2008/03/14 22:36 2008/03/14 22:36
I was drawing a concept diagram in the paper I am writing with Karl, and I need a vector graphics for a computer. I was using Inkscape to draw things, and I simply didn't want to draw a computer from scratch. So I googled for free svg library, and this website popped!

http://openclipart.org/ Open Clip Art Library

They have many properly tagged svg graphics in public domain! Awesome!
Below is the image I concocted (in bitmap 200 dpi, not all browsers support svg or eps, you know).
User inserted image

2007/12/17 11:28 2007/12/17 11:28
Few years back, MIT started to provide awesome lecture videos on the web under the name of open course ware (OCW). However, there are many lectures that doesn't have videos but just notes or syllabus. A tiny trick using google can be used to solve this problem: search only the ones with video lectures.
site:ocw.mit.edu inurl:videolectures
User inserted image


Don't forget to checkout the best lecture on linear algebra out there by Strang. It's simply amazing.
And in case you are looking for more video lectures, I recommend videolectures.net. They have some cool presentations from conferences.
2007/11/22 09:54 2007/11/22 09:54
To access university library resources from off-campus network, I need to go through a proxy server provided by the library. This is done by attaching a string at the end of domain names, which is non-trivial to memorize. So I made a bookmarklet in javascript to do this in one click.

Attach '.lp.hscl.ufl.edu' to the current url
javascript:
var u=document.URL;
var n=document.URL.indexOf('/',9);
var nu = String.concat(u.substring(0,n), '.lp.hscl.ufl.edu', u.substring(n));
alert(nu);
window.location.replace(nu);
If you are using noscript on firefox, you need to allow javascript for the website.
Feel free to copy/modify/redistribute this.

2007/04/10 17:41 2007/04/10 17:41
I am using LaTeX + BibTeX to write my thesis.
The university editorial office told me that I should keep the contents of a reference in the same page.
Here is a easy way to achieve this. Just add the following new definition of bibitem.

\let\oldbibitem=\bibitem
\renewcommand{\bibitem}{%
\filbreak
\oldbibitem
}

References:
  1. Jyotirmoy Bhattacharya's reply on news group
  2. UK TeX FAQ
TAG : ,
2007/01/27 15:42 2007/01/27 15:42
Not many people know there's a block comment functionality in MATLAB.

%{
These are all commented.
function call, for loop, everything.
%}

The default syntax file of vim 7 does not highlight these.
Add the following lines to $VIM/syntax/matlab.vim

syn region matlabBlockComment        start=+%{+    end=+%}+
HiLink matlabBlockComment        Comment

The syn region line has to come after the "syn match matlabComment" line.
TAG : , ,
2007/01/03 12:37 2007/01/03 12:37
MATLAB Version 7.0.0.19901 (R14)
gcc version 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)

Problem:

C-MEX compiles without problems, but when trying to call the MEX the following error ocurrs.
Unable to load mex file: /home/memming/code/cip/cip.mexglx.
/usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/libstdc++.so.6)
??? Invalid MEX-file '/home/memming/code/cip/cip.mexglx': .

Work around from mathworks:
su
cd $MATLAB/sys/os/glnx86
mkdir old
mv libstdc++.* libg2c.* libgcc_s* old
and restart MATLAB, recompile mex, and run it!
TAG : ,
 Prev   1   2   Next 
memming’s Blog is powered by Tattertools.com / Designed by faido