So there are two things that the subplot function in Matlab can not do.
1. Generate an "overall" title on the top of all sub-figures.
2. Make the sub-figures as compact as possible (usually very large margins will be made).
Normally, what we can do is save each sub-figure as eps or pdf, and use LaTeX to organize them. This works well and I highly recommend this way when you are preparing publication ready figures, but there are times that you just want to generate some report quickly and nicely.
So I found this two nice functions in Matlab file exchange:
1. mtit. This one will place a title automatically for you on top of everything.
2. subaxis. This one does roughly the same thing as "subplot", but with options that enables you to remove margins.
2012年5月15日星期二
2012年5月9日星期三
Upload images to our BBS abroad
Seems that our BBS can not allow we to upload image from other countries...
OK. This script can bypass the IP checking and do the uploading. It is developed by Zimu Liu.
OK. This script can bypass the IP checking and do the uploading. It is developed by Zimu Liu.
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: ./`basename \"$0\"` "
exit -1
fi
FULLPATH="$1"
if [ ! -r "$FULLPATH" ]; then
echo "File does not exist, or you do not have read privilge!"
exit -1
fi
FILESIZE=$(cat "$FULLPATH" | wc -c)
if [ $FILESIZE -ge 300000 ]; then
echo "The size of file exceeds 300000 bytes!"
exit -1
fi
FILENAME="`basename "$1"`"
EXT=$(echo $FILENAME | grep -i .gif$ || echo $FILENAME | grep -i .jpg$)
if [ -z "$EXT" ]; then
FILENAME="$FILENAME.jpg"
fi
URL=$(curl -F "up=@${FULLPATH};filename=c:\\${FILENAME}" \
-F MAX_FILE_SIZE=300000 -F board=C_Computer -F level=0 -F live=9999 -F "exp=" \
bbs.njupt.edu.cn/cgi-bin/bbsdoupload \
| tr -d "\015" | tr -d "\012" \
| sed "s/^$//g")
echo "\nCopy the following URL to your brower:\n"
echo "http://bbs.njupt.edu.cn/cgi-bin/$URL\n"
Solving the LaTeX error: "Too many unprocessed floats"
Yesterday I generated a LaTeX document using Matlab script. This document have about 50 tables, with even table embedded with 30 images. So LaTeX thought that it I can't handle this much floating objects.
I searched around on the internet and found the best solution for me is to add
\clearpage
after every table. This command will force LaTeX to dump all the cached floating objects till here. So basically it will print one table per page, which is fine in my case.
I searched around on the internet and found the best solution for me is to add
\clearpage
after every table. This command will force LaTeX to dump all the cached floating objects till here. So basically it will print one table per page, which is fine in my case.
订阅:
博文 (Atom)