Sunday, June 05, 2011

随想。

每个追逐自己梦想的人都让人感动。李娜是这样,中华达人中的那些平凡的人们都样是。在这一点上,大家没有差别。

Friday, June 03, 2011

reduce the top margin in pdf file.

crop the proper region you want in acrobat pro, then print it to a new pdf file.

One can also change some control numbers inside the pdf file, there are some numbers about the crop, changing those numbers has the same function as the tool crop. The rest procedures are the same.


The tool "touch up" in acrobat pro can easily move the selected objects, which is very convenient to reduce the top margin blanks.

Thursday, June 02, 2011

matlab solve function examples.

http://homepages.ulb.ac.be/~dgonze/INFO/matlab.html

Solving equations

To solve equations symbolically
eq1=sprintf('a-(b+1)*x+x^2*y');
eq2=sprintf('b*x-x^2*y');

sol=solve(eq1,eq2,'x','y');

sol.x
sol.y

To solve equations numerically
a=2;
b=5.2;

eq1=sprintf('%d-(%d+1)*x+x^2*y',a,b);
eq2=sprintf('%d*x-x^2*y',b);

sol=solve(eq1,eq2,'x','y');

sol.x
sol.y

Selecting real solutions
eq1=sprintf('2/(1+Y^4)-X=0');
eq2=sprintf('2/(1+X^4)-Y=0');

sol=solve(eq1,eq2,'X','Y');

sol.X
sol.Y

x=eval(sol.X)
y=eval(sol.Y)

k=find(imag(x)==0);

sol=[x(k) y(k)]