2010年1月31日星期日

LaTeX公式大小ZZ

LaTeX公式大小


使用LaTeX的一个好处,就是对于数学公式的排版。对于大量公式的论文,有时需要调整文档中显示公式的大小。

LaTeX根据文本字体的大小,调整公式的大小。但也可以自己定义,用到的命令为 \DeclareMathSizes{ds}{ts}{ss}{sss} 。例如,下面一段代码加在文档"preamable"部分就可以实现对公式大小的修改:

% Size of the math equations
\DeclareMathSizes{10}{10}{7}{5}
\DeclareMathSizes{11}{11}{7.7}{5.5}
\DeclareMathSizes{12}{12}{8.4}{6}
\DeclareMathSizes{13}{13}{9.1}{6.5}
\DeclareMathSizes{14}{14}{9.8}{7}

上面,第一个大括号里是文档使用的字号。只有在这与文档中字号定义相同时,后面对于公式大小的定义才有效。后面三个大括号分别定义的是,普通公式字号、第一级上下标、第二级上下标的字号大小。

如果在一个使用12号字体的文档里,使用

\DeclareMathSizes{12}{20}{14}{10}

就可以得到,相对大的公式。但注意到,行间公式也相应放大。

参考:

http://www.andy-roberts.net/misc/latex/latextutorial10.html


如果只想修改某几个公式的话,可以用下面方法:

\begin{small}
\begin{equation}
。。。。
\end{equation}
\end{small}

2010年1月30日星期六

SDL & UML

SML : Simple DirectMedia Layer

http://www.libsdl.org/


UML: Unified Modeling Language
http://en.wikipedia.org/wiki/Unified_Modeling_Language

2010年1月27日星期三

latex插入图片 ZZ

在会议论文中使用如下语句插入图片:

\begin{figure}[!htb]
\centering
\includegraphics[height=2.83cm,width=6.95cm]{./pic/figure1.eps}
\caption{The architecture of fuzzy control system}
\label{figure_sim}
\end{figure}

第一行,h:here,t:top,b:bottom表示将图片按高优先级到低优先级插入到当前位置、顶部、底部;第二行表示图片居中;第三行设置了图片的宽度、高度和位置;第四行设置了图片的名字;第五行设置图片的标签,以后在文章可以引用;第六行表示图片结束。

按照上面方法插入的图片,会显示Fig.1. The architecture of fuzzy control system。但是要求却是前面显示Figure 1.。该如何处理呢?这里在导言区里加入一个命令来改变变量的值。\renewcommand{\figurename}{Figure}。这样就将 Fig 改成了Figure。

---------------------------------

\usepackage[dvips]{graphicx}

\begin{figure}[htbp]
\centering %图形居中
\includegraphics[angle=90,width=0.65\textwidth]{p1.eps}
\caption{your figure title} \label{meinv}
\end{figure}

http://bullog.ycool.com/post.2620779.html


2010年1月24日星期日

How to build self confidence (ZZ)

You want to be confident and feel confident, but what if you're starting with little or no confidence? How do you get from Point A to Point B? True self-confidence isn't an overnight acquisition. It takes dedication to realize you are a good human being that is worthy of respect and you have to believe in yourself.

1.
Recognize your insecurities. What does that voice in the back of your mind say? Why do you feel ashamed of yourself? This could be anything from getting rid of acne, your regretting attitude, being over-weight or nagging friends at school. You need to identify reasons that make you feel unworthy, ashamed and inferior. Just pen them down and name them. You can also tear these written pieces to start feeling positive on those points.

2.
Don't see yourself as inferior to others. Whether it is related to your work, school or socializing skills, be conscious not to move around with a mindset that others are better or more qualified than you. To a certain degree, it is good to walk around with a feeling of superiority. However, do not take this attitude too far or else you would be perceived as a jerk.

3.
Talk about it with friends and loved ones. Wear it on your sleeves. Practice to remove it everyday but there is no quick fix. You need to find the root cause of the problem. You need to work on your shortcomings before you can move on.

4.
Remember that no one is perfect. Even the most confident person has certain insecurities. Lifes circumstances make us realize that we lack something. Accept the reality as there are several bumps down the life’s road.

5.
Identify your abilities. Everyone is good at something. Try to discover what you excel in and then focus on your talent. Learn to take pride in them. Give yourself credit for your successes. Inferiority is a state of mind in which you have declared yourself a victim. Do not do that. Find something that interests you or pick up art, music or writing to express yourself. Everyone is born with a specific ability. You can develop and excel in yours. If naming your interest gets difficult, see what others enjoy doing or simply move out of your comfort zone to join an enthusiasts club. Following your passion works as a therapy making your mind feel unique and accomplished. This therapy in a way implants confidence in you. Having multiple interests boosts your confidence and increases your chance of meeting compatible friends.

6.
Be thankful for what you have. At times, insecurity and lack of self-confidence stems from need for emotional validation, simply luck, or money. By acknowledging and appreciating what you do have, you can combat the feelings of being incomplete and unsatisfied. One needs to have a peaceful mind rather than the worldly possessions. Just remember one thing that all of us are the blessed ones. It is the path that creates all the difference.

7.
Be Positive, even if you don't feel the same way. Self-compassion and sympathy from others is not the answer here. Never allow others to make you inferior. Love yourself and speak positively about your future progress and qualities. By doing so, you condition your mind for a positive outlook.

8.
Accept compliments gracefully. Do not show any attitude. Take it to heart and respond positively. "Thank you" or a smile works well.

9.
Look in the mirror and smile. According to the ‘facial feedback theory’, facial expressions send strong messages to the brain which in turn, would register them. A day-to-day smiling would make you content and confident in the long run. Talking in front of the mirror too improves your communication skills.

10.
Fake it. With that, acting confidently all times makes you start believing in yourself. Notice your feelings and also how others perceive you.

11.
Stick to your principles. Believing in principles does not stand for rigidness. It empowers you to stand for a cause or else you would fall for anything. Build this habit today no matter in what area you are heading.

12.
Help others. Kind gestures to others make a positive difference in your life. Be thankful to the valet who serves you the morning tea. Likely, you can provide a nearby elementary school with funds or stationeries. Bake something for your neighbor for no reason. Confidence thus earned would be long-lasting.

13.
Don't Care What Other People Think Thinking from others point of view would only put you on hold. Use your mind and do what you desire.

14.
Remember Be ready to ignore innuendos for a simple reason that nobody is perfect.

15.
Look at yourself in the mirror and list the positive qualities that you have. This would work on self-worth.

16.
Work hard. Keep on doing your work honestly. Have a target in your life and focus on it. Do anything to reach that target and see how confidence surfaces.

Tips

* Exercise and eat healthy. Exercise raises endorphins and makes one feel happier and healthier. It is certainly an easy and effective way to boost your self-confidence.

* When you are feeling terribly insecure, write down your positive traits and read them back. This feedback would give you surprising results.

* Turn envious feelings into a desire to achieve. Do not crave for what others have but work because you are in need of that.

* Do not be afraid to push yourself beyond your physical or mental limits. Such a pressure would help you see how easily things can be achieved and thereby helps you hone skills.

* Take a wilderness experience course such as those found at Outward Bound or NOLS. Learning how to survive in the wilderness will build your confidence in other areas of life too. You can also try taking martial arts or fitness class/course (or both) to help build confidence and strength.

* Condition yourself to talk positively about yourself. Every time your mind wanders and say you are not apt at it, pause for a minute, undo those negative vibes and say you can do. At least you should make an attempt to accomplish that daunting task. With that, you will learn more about yourself.

* Everyone is beautiful in their own way. So do not let anyone tell you something otherwise. Beauty is less important than qualities. Anyways, everyday feed your mind that you are beautiful. The reverberations of such feeding would soon reflect on your face giving you a stunning appearance.

* Material things like money, luck and beauty are society created illusions of happiness. Possessing them gives you a comfortable life but they are not indicators of happiness. Having branded products in your closet talks about your social position and is definitely necessary but in the end your mind chases happiness. Happiness is simply a state of mind which you can have even in absence of worldly pleasures. For happiness you need to enjoy every thing you do. Happiness never existed outside but in the realm of your own mind. Clubbing is tagged as a fun thing and it could be rightly so, if you enjoy it. Recall your childhood days when you never bothered to look pretty or become rich. Those were ‘the good ole days’ when happily and lovingly we used to get engrossed in fun games.

* You can do any work with aplomb if you continuously wear a smile on your face.

* Your first thought is your instinct. Always go by its verdict. Trusting your instinct will make you confident and you can take a right decision at the right time.

* Practice good posture. Our body posture signal others whether we are active or are indolent individuals. A simple habit to learn and implement is to stand and sit straight. Your proper body posture will speak for you.

* Avoid perfectionism. Perfectionism paralyzes you and keeps you from accomplishing your goals.

* Write something on wikiHow.com. If you have a suggestion for anything, then share it. You will feel good for contributing, helping someone and having your voice heard.

* Start your day on a positive note that you would do wonders today. Never think negative about yourself.

* You can provide yourself with an extra dose of confidence by using the Best Me Technique of self-hypnosis to pre-experience the rewards of a long-term goal, thereby reducing the stress.

* Self confidence increases with knowledge and perseverance. Improve your knowledge on subjects that interests you.

* Be true and honest to yourself. Accepting your imperfections help you concentrate more on the talents. Also accept yourself as you are and do not run after being perfect. Leave aside those high ambitions, just work hard and you will definitely reach somewhere.

* Worrying about how others treat you, will only upset you. Instead, make friends with books and music which would soothe your nerves too.

* Do not try to catch eyeballs by being loud. Instead keep your head up, smile and move on because clearly they are missing out something phenomenal. Work hard and be happy.

* It may sound bizarre but comparison leads to a troubled mind or say troubled minds tend to compare two entirely different things. Do not do that to yourself.

* Feel that you are awesome, even if people say awful things for you. Nobody is perfect, so why be anxious about something that you are not.

* Find a balance between working to fulfill your aspirations and appreciating what you've already achieved. It is important to set goals to better yourself, but it is just as important to acknowledge what you already are.

* Be yourself. Never try to change yourself to get someone’s approval or acceptance. Never hide your quirkiness. Be confident in your flaws as these flaws make you unique in this perishable world.

Warnings

* Do not get wrapped up in your mistakes and dwell on bad points. They could turn out to be a healthy contrast to your good points or even give you something to improve. There is no feeling like being good at something you were really bad at.

* You are a person with what you have. People demean their self-worth when comparing possessions.

* Surround yourself with nurturing friends, not overly critical individuals who make you feel inadequate or insecure which could do great damage to your self confidence.

* Do not be too confident in finding a partner yourself. You will regret creating a false personality, if the relationship starts working.

* Lack of confidence is not necessarily a curse. So do not worry. Many ignorant, fanatic and maniac people are confident but that too is not desirable. Building self confidence should be associated with simultaneous growth from within. Thus by overcoming pettiness and superficiality you can build unshakable self confidence [See: Conceptual Stress by Dr. Shriniwas Kashalikar].

* Do not mistake being loud for confidence. Loud people cover their insecurities and are in no way confident. If you are happy with yourself, you are confident.

* Do not get stuck with advertisements claiming quick solutions to your problems. No magic will happen if you continue to ignore facts.

* Learn to accept sincere compliments that come with the flow and keep them in mind. Never try to garner praise.

http://www.wikihow.com/Build-Self-Confidence

2010年1月23日星期六

EbN0, EsN0, SNR

The relation between Eb/N0, Es/N0, SNR?


Eb = spow/br , where spow is the signal power per symbol, br is the bit rate
N0 = npow/sr , where npow is the noise power per symbol, br is the symbol rate

Eb/N0 = (spow/npow)*(sr/br) = SNR*(sr/br) = SNR*1/M ,
Es/N0 = Eb/N0*M ,
Es/No = SNR.
where one symbol has M bits.

Note that, all the values are linear scale.
For dB value, do the transform using 10*log10()

2010年1月22日星期五

TinyOS and Zigbee

TinyOS project:
http://www.tinyos.net/


To get started, e.g, installation,
http://docs.tinyos.net/index.php/Getting_started

Some tutorials about how to use TinyOS:
http://docs.tinyos.net/index.php/Using_TinyOS
http://docs.tinyos.net/index.php/TinyOS_Tutorials

Project lists:
http://webs.cs.berkeley.edu/tos/related.html

2010年1月21日星期四

linear regression

In our model, LQI= a*CORR+b, where LQI and CORR can be obtained, a and b are constant.
Therefore, we can use the linear regression to find out a and b.

From matlab, I found some useful functions for linear regression:

1) Polynomial curve fitting :
p = polyfit(x,y,n)

p = polyfit(x,y,n) finds the coefficients of a polynomial p(x) of degree n that fits the data, p(x(i)) to y(i), in a least squares sense. The result p is a row vector of length n+1 containing the polynomial coefficients in descending powers

Source: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/polyfit.html

2) Polynomial evaluation
y = polyval(p,x)

y = polyval(p,x) returns the value of a polynomial of degree n evaluated at x. The input argument p is a vector of length n+1 whose elements are the coefficients in descending powers of the polynomial to be evaluated.

Source: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/polyval.html

2010年1月19日星期二

Some linux commands

To All user list including special user created.
cat /etc/passwd

To be continued

---------------------------
SVN
"Subversion is a free/open-source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine”.

Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change."

for the basic use of svn, see(in a terminal):

svn help add
svn help checkout
svn help status
svn help revert
svn help update

for more information, see:
http://svnbook.red-bean.com/


Trac

"Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. Our mission is to help developers write great software while staying out of the way. Trac should impose as little as possible on a team's established development process and policies.

It provides an interface to Subversion, an integrated Wiki and convenient reporting facilities.

Trac allows wiki markup in issue descriptions and commit messages, creating links and seamless references between bugs, tasks, changesets, files and wiki pages. A timeline shows all project events in order, making the acquisition of an overview of the project and tracking progress very easy. "

see http://moon.cs.uh.edu/trac
for our trac projects
You need to use your svn account to login.

2010年1月14日星期四

DFT VS FFT Computation(ZZ)

NDFT共需要N2次复数乘法和N(N-1)次复数加法,共4N2次实数乘法和(2N2+2N*(N-1))次实数加法。当N很大时,这是一个非常大的计算量。

利用FFT算法之后,任何一个N2的整数幂(即N= 2M)的DFT,都可以通过M次分解,最后成为2点的DFT来计算。M次分解构成了从x(n)X(k)M级迭代计算,每级由N/2个蝶形运算组成。完成一个蝶形计算需一次乘法和两次复数加法。因此,完成N点的时间抽选FFT计算的总运算量为:

复数乘法次数:M*N/2=log2N*N/2

复数加法次数:M*2*N/2= log2N*N

大多数情况下复数乘法所花的时间最多,所以以复数乘法的计算次数来比较DFTFFT的效率为:DFT/FFT=2N/log2N