Thursday, December 22, 2011

MATLAB: Overriding the default .mat file version

Hi there,

I've been working with Matlab ver 7.5 yesterday at home.. yeah at home....
since the toolbox of Matlab ver 6.5 at school is so limited... well..

feel kind of uneasy to show them my own ver of Matlab (you know why).. so, I was saving the workspace as usual way. Unfortunately, Matlab ver 6.5 can't read the .mat file generated. Frustrated...

After some googling... I found the way to overcome this prob.. enjoy!!



Overriding the Default MAT-File Version

To identify or change the default version, select File > Preferences > General > MAT-Files. Alternatively, specify the version as an option to the save function.
For example, to create a MAT-file named myfile.mat that you can load with MATLAB Version 6, use the following command:
save('myfile.mat', '-v6')
The possible version options for the save function include -v4-v6-v7, and -v7.3. For more information about the differences between previous and current MAT-file versions, see the save function reference page.

Tuesday, December 20, 2011

Kingsoft Writer - MS Office Alternative

Post ini aku tujukan khas buat rakan-rakan aku yang dulu-dulu asik pakai MS Office pirate.

Sekarang aku tak pakai dah yang pirate pasal opis aku ada kasik yang ori punyer... so, sesapa yang masih stick ngan MS Office pirate dan rasa macam dah tak nak guna pirate soft lagi.... silalah guna samada Libre Office or Kingsoft Office.

Kedua-dua software ni adalah free.... dan King Office ada version Professional yang berbayar.. sangat murah berbanding dengan MS Office.

Beza antara free version and yang berbayar boleh korang tengok kat sini.
Beza antara Office Libre dan King Office boleh korang tengok kat sini.

Office Libre adalah open source dan semakin hari semakin improve. Cumanya, masalah sikit pasal Office Libre ni dia tak berapa nak mesra dengan MS Office. Kalu buka docs daripada MS Office sure ada margin lari sana sini... sakit ati gak laaa...

King Office on the other hand, mmg di buat sebagai alternatif untuk MS Office dan very compatible with MS Office.

Aku guna dua-dua software diatas... ikut sesedap rasa.. dah kasik free... install jer ler.....

Cukup la setakat Writer (Word), Presentation (Power Point) dan Spreadsheet (Excel).. Korang bukan guna lebih dari tu pun.... nak power-power spec dia sangat pun wat membazir memory jer...

Mari kita bergerak kearah Zero Piracy!!...

Ust Zaharudin ada pendapat tersendiri pasal piracy ni... Ust Azhar Idrus pun ada pendapat dia yang unik.... korang pilih lah...

Ubuntu 11.10

Semalam.... upgrade ubuntu 11.04 ke 11.10 .... semuanya berjalan seperti biasa... tetiba....

keluar window yang mengatakan aku hanya buat partial upgrade... eeeehhh!!??

so, aku bukak update manager and buat partial upgrade.... so far... everything so good.. until restart then aku dapat message yang ubuntu tak dapat nk set resolution ke pixel yang sepatutnya... so, aku tau laaa yang driver nvidia tu belum activate lagi...

pendekkan cerita... driver tu tak dapat nk di install dan aku search... punya search... search punya... dapat tau yang ini mmg masalah yang orang ramai jugak selain dari aku....

punya search lagi search.... aku install satu .sh file yang ada command utk install nvidia driver... unfortunately..  I think i have disrupt the grub menu and something else in the system.. before I went to sleep, the screen won`t boot into the system instead showing error in mounting the HD... arghh.. wtfish!!..

dengan bangganya.... aku tutup laptop and masuk tido... lagi best!!.. bila pulak lagi aku nk bukak external HD aku yang ada ubuntu tuh.. pasalnya kat laptop aku dia x mau boot.. kat laptop bini aku nk pulak... pilih kasih tol!!!..

padan muke aku ko ... install tak tengok tarikh articles dalam tenet tu publish biler...

Sunday, December 18, 2011

House Warming

Setelah 3 bulan genap hari ni aku landing @Jepun...
baru semalam buat housewarming... sebabnya.... owang umah aku da smpi last week..

buat sesimple jah... Nasi ayam... puding (aku rasa laa..).. fruit skewers... abis gak aar 6 periuk nasik :)

yeay!!

~seyes sejuk... main2 area bawah 4 je skg neh adeshhh!!..

Friday, December 16, 2011

PDF Reader

Assalamualaikum.......................

lama dah tak update rakaman2 yang tak bes pasal kehidupan seharian aku neh huhu.. anyway...

This is a very short entry...

Sedang membaca e-buku, aku nak bookmark page yang menarik... MALANGNYA Adobe X yang aku guna ni hampeh banyak sket. Punya laaa zaman berubah, tapi adobe masih tak nak sediakan tool utk page bookmark. So, aku pun cari laa plugin yang mana patut dan jumpa laaa plugin ini. Bagi sesiapa yang pakai Win 7, letak file ni di C:\Program Files\Adobe\Reader 10.0\Reader\Javascripts.

Plugin ni ok laa... tapi aku x berapa nk suka pasal performance lembap sket... so, malas nk huru hara... aku pun bertukar laa kepada Foxit Reader... aku da pernah pakai software free neh dulu... tp bagi aku, interface yang adobe buat tu lebih familiar.. dats y liat sket nk pindah ke reader lain..

But, これから (baca from no now on) aku pakai Foxit Reader kot.... senang nk read e-book yang aku download tuh...

ok..
end..
bye..

update:

Serius!!! aku suke Foxit Reader latest version ni... aku x suka sangat pakai keyboard bila membaca pdf... dan this app really provide usefull shortcut to many essential function!! yeah!! 

Tuesday, December 6, 2011

LaTeX series -- Figure

Konbawa!!!!.....

Well... LaTeX lesson is back!!!..

Today.... I got stuck on chart... well.... it is not really stuck.... I could convert text as figure if I MS word. However, I'm currently using LibreOffice that does not support this particular functionality. All I could do is to convert the chart to pdf file and convert to .eps file...

Well... it works but I was reluctant to admit that the quality of .eps file is quite low..  So, I spent "quite some time" (3 hours or so) to figure out on how to generate quality .eps file... Again... I was loath to install any software such as Inkscape which really capable of handling .eps file (generating/converting to .eps)...

To cut the story short.... I GIVE UP on trying to find the solution.... urmmm... the quality of pdf file is better in my opinion.... So.... What I did was:-

(a) Paste the chart generated in LibreOffice Writer into LibreOffice Draw
(b) Export as pdf
(c) Download pdf-cropper. Crop the white space.
(d) Replace \usepackage[dvips]{graphicx} with \usepackage[pdftex]{graphicx} *refer to LaTeX entry
(e) Add a new package \usepackage{epstopdf}
(f) Replace setting in Quick Build from "LaTeX + DviPs + Ps2Pdf + Pdf Viewer" to "PdfLaTeX + Pdf Viewer"

Now... everything is in order.... instead using .eps file for the figure... I will use .pdf file which could easily generated and much better in quality. I will stick with this setting for a while until I find a way to use .eps file effectively..... 

Until then..... Good luck for me!! :)


Update: Dec 8, 2011


Sometimes it's annoying to set up the figure placement if you want to use figure that span for two column {figure*} instead of {figure}. Well, there are solutions for this particular problem. You can use \usepackage{dblfloatfix} which actually a combination of package stfloats and fixltx2e. Placement control such as [tbp] can be used "correctly", though it depends on your document as well. The more figure*, the messy will it be.. 

Update: Jan 19, 2012

When using subfigure package, certainly we want to cite the figure in the main text and for IEEE the citation/reference would be something like "Fig. 1(a)". Using default configuration \ref{figure} would not work and will display "Fig. 1a". On the other hand, \subref{figure} will only display "Fig. (a)". Nevertheless, there is a simple twewak that I found to be useful and worked perfectly. Just add the following command and BOOM!!!... \subref{figure} command will now present you with "Fig. 1(a)" perfectly!!


\captionsetup[subfloat]{listofformat=parens}

~see LaTeX, LaTeX series -- Table

Monday, December 5, 2011

LaTeX series -- Table

Minna sann~..... genki desuka?!!

Jyaa~... kyou... oppss... tershashul pulop!!.... ari ni aku belajar Te-Form (て-Form) kat kelas... pening sket aar... bnyk sgt condition dia... basically apa yang aku faham....
verbs ます-Form boleh dipecahkan kepada 3 kelas... Group I, II & III.

Group II & III adalah mudah.... hanya perlu omit ますand replace with て. Untuk Group II, bunyi yang terakhir sebelum ます adalah "ee" (え). Perbezaan antara Group II & III hanyalah pada Noun+ます (Group II) dan Noun+します (Group III).... Sebagai contoh:-

Group II:-

みせます >> みせて
おしえます >> おしえて

Group III:-

べんきょうします >> べんきょうして
さんぽんします >> さんぽんして

Bagi Group I pula, agak sukar sedikit kerana banyak condition dimana ia bergantung kepada bunyi akhir sebelum ます. Eh.....!!

Macam silap entry je neh... huhuhuhu... ok ok... back to the topic...

Today, I've spent most of my time to figure out how to draw a nice table!!! It's quite challenging, especially for me who is very new to LaTeX... enough with talk... let's go straight to the point.. Alrite..

First thing, we need to determined how the table should be. For two column articles, would it be 1 column? span for 2 column? . Then, how many column would you like to have for the table etc... I'll only show what I've done today for my future reference :-)

\newcommand\T{\rule{0pt}{3.1ex}} % Adds a space between the text and the [T]op \hline
\newcommand\B{\rule[-1.7ex]{0pt}{0pt}} % Adds a space between the text and the [B]ottom \hline
\setlength{\doublerulesep}{\arrayrulewidth} %make \hline \hline as thick line

\begin{table*}[!t]  %span table for 2 column. Omit * if want to make table in 1 column
\caption{Title of the table}
\label{table_1}
\centering
%make 3 column, set alignment for column 1- left, column 2-right & column 3-center
\begin{tabular}{l r c} 
\hline \hline %bold horizontal line. Act as the table border


% \multicolumn{2}{c}-- meaning, span 2 column and centered
% \T \B -- meaning, add space for top and bottom
% \cline{2-3} -- meaning, make a line from column 2 until column 3
& \multicolumn{2}{c}{\textbf{Some Title}} \T \B \\ \cline{2-3}


% \multicolumn{1}{l} -- meaning, change alignment for column 1, from original right align to left align
% \hline -- meaning, make a horizontal line (thin)
\multicolumn{1}{l}{Some Parameters} & 2nd Parameter & 3rd Parameter \\ \hline 
& row1column2 & row1column3 \\ % "&" symbol at the beginning is used to skip 1 column
row2column1 \T \B & row2column2 & row2column3 \\ % end row 2
row3column1 \T &
% wrap long text using {minipage}. [t] is to set to the top align. {1.1in} is to set the length of minipage
\begin{minipage}[t]{1.1in} 
\begin{flushleft}a very long line for row3column2 a very long line for row3column2 a very long line for row3column2 a very long line for row3column2 \end{flushleft}%
\end{minipage} 
% wrap long text using \parbox. {1.3in} is the length of the \parbox. 
% {flushleft} -- meaning, to set the alignment to left
\parbox{1.3in}{\begin{flushleft}a very long line for row3column3 a very long line for row3column3 a very long line for row3column3 a very long line for row3column3 \end{flushleft}} \\
\hline \hline
\end{tabular}
\centering
\end{table*}

The output of above command as follow:-
From the table, you can see that the \parbox is quite difficult to handle. It's behavior is not as expected. Well, this is as far as I can do... for now..


Alrite.... I think it is enough for now.... we'll cont. some other time... I need to finish the unfinished business!!

じゃ。まった こんど

Update: Dec 8, 2011

Using \begin{flushleft} \end{flushleft} somehow leave unwanted vertical space in the cell and that is why \parbox is behaving wild. What I did was, use \usepackage{array} and change the setting my column to something like this:-


\begin{tabular}{l >{\raggedright}p{0.2\textwidth}  >{\raggedright\arraybackslash}p{0.3\textwidth}}
\toprule
row1column1 & row1column2 & row1column3 \\ \midrule
\bottomrule

\raggedright} is used to align the text to left.
\arraybackslash is required in order to make \\ works.
\toprule is required for \midrulerule\bottomrule and "" to works.



~see LaTeX

Sunday, December 4, 2011

LaTeX

Akhirnyaa............... berjaya jugak aku solve problem yang sepatutnya bukan problem... hahahhaa.... well... kalu blaja sendiri mmg camnih... the learning curve sometimes looks like stock market... up and down... and sometimes could hardly get the slope to +ve pattern... anyway... anyhow... maybe I just jot it down here in for future use... :)

Software:-
Ghostscript
GSView 
MiKTeX 2.9
TeXstudio 2.2

Ghostscript & GSView are essential to run LaTeX. Without these two softwares, LaTeX could also run but I would suggest to install them to avoid any unnecessary problems in the future... The installation is straight forward... Click and follow the instruction...

MiKTeX 2.9 is one the best software on windows platform... The installation also quite straightforward and could take sometime to finish. I strongly suggest to tick on the option "install missing plugin on-the-fly" (or the like) to ease up the installation process. Otherwise, you need to wait in front of the pc and click on every pop up that will come out for about 15-30 minutes.

TeXstudio 2.2 is a very userfriendly software for beginners. It will assist the user without the need to type full command as it will display the related command in "drop down list" as you type. You need to configure the Quick build to "LaTeX + DviPs + Ps2Pdf + Pdf Viewer" to allow .eps file to be displayed correctly using package "\usepackage[dvips]{graphicx}"

Sometimes, the template provided by the conference organizer ie. IEEE must be altered to meet the requirement set. You don't need to push yourself to edit .cls file but instead just use "\renewcommand"... For my case, I need to use "\renewcommand{\figurename}{Figure}" & "\renewcommand{\IEEEkeywordsname}{Keyword}" to set the figure caption as "Figure" instead of "Fig." and "Keyword" instead of "Key-Index"..

All command:-

\usepackage[dvips]{graphicx}
\renewcommand{\figurename}{Figure}
\renewcommand{\IEEEkeywordsname}{Keyword}

need to be loaded AFTER "\documentclass[conference]{IEEEtran}" call.

The rest could be "easily" learn :) from the template.... just follow the template provided....

I could rest happily tonite...

Peace!!! No War!!!
Kami Benci Rasuah!!!
Yang Salah Tetap Salah!!!