Monday, April 6, 2009

Mathematica memos

Concepts:

  • Polynomial is displayed different from the "standard" math form
  • There are a number of cell types. Only input cell can be calculated.

Tips:

  • constants: Pi, I, E
  • ?var is used to inquired about the variable named var, while ?`* about all global variables
  • Clear[var1, var2, var3] (or var1=) clears variables var1, var2 and var3, while Remove[var1, var2, var3] removes variables var1, var2 and var3
  • Clear["`*"], Remove["`*"]: clears/removes all global variables
  • N[expression, n] displays numerically with n significant digits (default value is 6), N[exp] is equivalent to exp//N
  • %, %%, %%% and so on recall the previous values
  • ?cmd, ??cmd, ?*md, ?c*, ?`* (or c* Ctrl+K): help for commands
  • Plus[a,b,...] vs a+b+..., Times[a,b,...] vs a*b*..., Substract[a,b] vs a-b, Divide[a,b] vs a/b, Minus[a] vs -a, Power[a,b] vs a^b, Power[a,b,c] vs a^b^c
  • Equal[x,y] vs x==y, Uneqaul[x,y] vs x!=y, Less[x,y], Great[x,y], LessEqual[x,y], Great[x,y]
  • And[p,q], p&&q; Or[p,q], pq; Xor[p,q]; Not[p], !q; Implies[p,q]

Friday, March 20, 2009

Thursday, March 5, 2009

On researches

Don't go out to find applications and new directions, it will come to you naturally as your current research goes deep enough.

There is only good and bad research. There is no fundamental or applied research.

There does not exist a category of science to which one can give the name applied science. There are science and the applications of science, bound together as the fruit of the tree which bears it. (Louis Pasteur)

Friday, February 27, 2009

Installing LaTeX tools for Windows

There are many tools you can use LaTeX for windows.

1. Here is a suite of tools you can use LaTeX compiler: MiKTeX at http://www.miktex.org/

2. Viewer, Converter: Ghostscript and Ghostview: http://www.cs.wisc.edu/~ghost/.

3. Editing environment, WinEdt: http://www.winedt.com/

These tools have been developed by separate folks, but they are good about working together. We have found they work best together if installed with default locations and other default settings. This is not to say that you could choose other locations, but it is possible that you may need to take some extra steps to teach them how to work together in that case.

Since WinEdt is an integrated environment that calls the other tools, we suggest installing it last in case that helps it find the other tools.

The web page, http://www.ats.ucla.edu/stat/latex/icu/install_win.htm, can be refered to for details.

LaTeX or Word?

My rules of thumb for using WYSIWYG systems:

  1. One page or less: have it printed by a secretary.
  2. Up to two pages: do it yourself using MS-Word (for example, this document was written with MS-Word).
  3. More than two pages: do it yourself LaTeX. (If it is Hebrew, I just forget it)

Extracted from: http://www.cs.technion.ac.il/~yogi/Courses/CS-Scientific-Writing/latex.htm

LaTeX resources

In Chinese:

http://staff.ustc.edu.cn/~xujm/lunwen003.pdf How to write good academic papers

http://math.ecnu.edu.cn/~latex/docs/Chs_doc/reference.pdf Common problems in dealing with references in a paper

http://www.math.ecnu.edu.cn/~latex/doc.html LaTeX references

In English:

http://www.tug.org/docs/metapost/mpman.pdf METAPOST a user’s manual

http://staff.science.uva.nl/~heck/Courses/mptut.pdf Learning MetaPost by doing

http://tex.loria.fr/prod-graph/mpgraph.pdf Drawing Graphs with MetaPost http://ctan.binkerton.com/graphics/metapost/mpgraph.pdf

beamer_guide.pdf

Beamer tips

\usepackage{wallpaper}

\setbearmercolor{background canvas}{bg=} produces transparent canvas (background)

\usepackage{url}

The following stuff is NOT verified by myself!
\documentclass[CJK,notheorems,mathserif,table]{beamer}
\useoutertheme[height=0.1\textwidth,width=0.15\textwidth,hideothersubsections]{sidebar}
\usecolortheme{whale} % Outer color themes, 其他选择: whale, seahorse, dolphin . 换一个编译看看有什么不同.
\usecolortheme{orchid} % Inner color themes, 其他选择: lily, orchid
\useinnertheme[shadow]{rounded} % 对 box 的设置: 圆角、有阴影.
\setbeamercolor{sidebar}{bg=blue!50} % sidebar的颜色, 50%的蓝色.
%\setbeamercolor{background canvas}{bg=blue!9} % 背景色, 9%的蓝色. 去掉下一行, 试一试这个.
\setbeamertemplate{background canvas}[vertical shading][bottom=white,top=structure.fg!25] %%背景色, 上25%的蓝, 过渡到下白.
\usefonttheme{serif} % 字体. 个人偏好有轮廓的字体. 去掉这个设置编译, 就看到不同了.
\setbeamertemplate{navigation symbols}{} %% 去掉页面下方默认的导航条.
%%------------------------常用宏包---------------------------------------------------------------------
%%注意, beamer 会默认使用下列宏包: amsthm, graphicx, hyperref, color, xcolor, 等等
\usepackage{CJK}
\usepackage{subfigure} %%图形或表格并排排列
\usepackage{xmpmulti} %%支持文中的 \multiinclude 等命令, 使 mp 文件逐帧出现. 具体讨论见 beamer 手册.
\usepackage{colortbl,dcolumn} %% 彩色表格
\graphicspath{{figures/}} %% 图片路径. 本文的图片都放在这个文件夹里了.
\DeclareGraphicsRule{*}{mps}{*}{} %% 使 pdflatex 可以纳入 metapost 做的图片.
\logo{\includegraphics[height=0.09\textwidth]{whu.1}}%% 武大校徽, MetaPost 文件.
\renewcommand{\raggedright}{\leftskip=0pt \rightskip=0pt plus 0cm}
\raggedright %% 中文对齐
\def\hilite<#1>{\temporal<#1>{\color{blue!35}}{\color{magenta}}{\color{blue!75}}}
%% 自定义命令, 源自 beamer_guide. item 逐步显示时, 使已经出现的item、正在显示的item、将要出现的item 呈现不同颜色.
\newcolumntype{H}{>{\columncolor{blue!20}}c!{\vrule}}
\newcolumntype{H}{>{\columncolor{blue!20}}c} %% 表格设置