Posted By Tommy

Writing a research article

When writing a research article, several steps can be followed. But when I’m writing for a journal, and is it any different than writing for a university course?

For ecample, and take the following guide.

http://abacus.bates.edu/~ganderso/biology/resources/writing/HTWstrategy.html

He suggests that we do a literature review first, and write up the introduction. Then we design and conduct the experiment.

This guide is for biology, not computer science, and it is for university classes, not academic publication. Nonetheless, couldn’t there be such a streamlined procedure for doing academic research?

For example, after amassing 10 articles and one to two books, I’d write a literature review and then an introduction. Then I would design and conduct an experiment, write it up, and then write a conclusion. That would be that. I think we need to try it and see how it goes. Onwards and upwards, ignore the furnaces of the paper factory.

Posted By Tommy

Handbook of Monte Carlo Methods

This book is going to be published in 2011. It explains in detail the theory and practice of Monte Carlo methods. For example, it will explain how to generate billions of random numbers and ensure that the numbers are really random. For example, MATLAB uses the Mersenne Twister algorithm by default, but in fact, this method is not suitable for Monte Carlo methods because of the fact that when you get an extremely low number from this algorithm, the next number will more likely be a low number as well. So, this book will teach us how to generate the random numbers appropriate to Monte Carlo methods.

The official citation for the book is:

D.P. Kroese, T. Taimre, Z.I. Botev (2011). Handbook of Monte Carlo Methods,
Wiley Series in Probability and Statistics, John Wiley and Sons, New York.

Currently, the site contains all the MATLAB code for the book. Although we don’t have the book yet, this means that we can still work through the problems. The site is at:
http://www.maths.uq.edu.au/~kroese/montecarlohandbook/

The book is currently listed at $127.72, but it looks like this price is including a 12% discount already. I suppose that after the preorder is finished, the price will go up to $145. You can preorder the book at Amazon.

Posted By admin

Recipes

Lots of great recipes available: doernerrecipes.blogspot.com

Posted By Tommy

Edu account email on Android

I’ve got a Nexus One, and I want to receive my Microsoft Live@Edu account on my phone.

It should be easy to do and it is except that there’s some information that is required to do this.
The main thing is the server address. It is listed at:
http://www.microsoft.com/online/help/en-us/helphowto/c0a1a4b9-111f-4bd4-8fab-8147344cd278.htm

Mobile Device URLs
Your mobile device URL is determined by the storage location of your Microsoft Online Services data. To connect to Microsoft Exchange Online, your cellular service plan must support Windows Mobile.

Asia Pacific (APAC) https://red003.mail.apac.microsoftonline.com
Europe, the Middle East, and Africa (EMEA) https://red002.mail.emea.microsoftonline.com
North America https://red001.mail.microsoftonline.com

Select the correct server. For Australia, that’s then red003.mail.apac.microsoftonline.com

You also need your domain\username, where domain is nothing (“”), and username is your email. So you should get something like: \email.name@flinders.edu.au
Notice that backslash. You need it. On my phone on-screen keyboard, I needed to press the numbers button to bring up the numbers on-screen keyboard, and then press the symbols button to bring up the symbols on-screen keyboard.

So open up the Email Application, open the menu with the menu button, then fill in your email address and password. The easiest thing to do is select “Manual setup” where you can then select Microsoft Exchange ActiveSync. Now it’s time to enter the details we worked out above.

Domain\Username: \email.name@flinders.edu.au
Password: ***********
Server: red003.mail.apac.microsoftonline.com

That’s it! Press Next, and iff you’re lucky, you’re now the proud owner of a Microsoft Exchange Sync account that pushes to your mobile phone. In my experience the push delivers the mail almost instantly after it’s sent, but it doesn’t drain the battery like the Twitter push.

Here is a handy MATLAB function for converting a M*N*3 dimensional RGB image into an M*N dimensional array of indexes and a P*3 dimensional map. This is interesting because it’s lossless, unlike the MATLAB function rgb2ind, which has a low maximum number of colors.
function [ ind, map ] = myrgb2ind( rgb )
%MYRGB2IND Converts an RGB image into an index array and a map of colors
% make a map of all color values in rgb
% map = 3 columns, index of and the second is the color[rgb_width,rgb_height,channels] = size(rgb); % W*H*channels matrix
% don't use the rectangular shape of the image, just use one long column
[rgb_width,rgb_height,rgb_channels] = size(rgb);
index_all = reshape(rgb,rgb_width*rgb_height,rgb_channels);
% sort the image so all the colors are in order
index_all_sorted = sortrows(index_all);
% remove all colors that are duplicates
map = unique(index_all_sorted,'rows');
% assign index values of the map to each pixel position where the color occurred
% and the reshaped image is index_all;
[NULL,ind_reshaped] = ismember(index_all,map,'rows'); % ind_reshaped holds the row number of the corresponding color
ind = reshape(ind_reshaped, rgb_width,rgb_height); % reshape ind to the size of the image
end

And then for converting back:
function [ rgb ] = myind2rgb( ind, map )
%MYIND2RGB converts from lossless index to uint8 rgb
% determine the sizes, NULL can be ~ in 2009b and beyond
[NULL,rgb_channels] = size(map);
[rgb_width,rgb_height] = size(ind);
% reshape ind to the size of the image
ind_reshaped = reshape(ind, rgb_width, rgb_height);
% assign the colors via the index of each color in map
rgb_reshaped = map(ind_reshaped,:);
% get the picture to the right dimensions
rgb = reshape(rgb_reshaped, rgb_width, rgb_height, rgb_channels);
end

To test this I created the .m file program:
close all; clear all
%read in the image and show it
me_rgb = imread('../me.jpg');
imshow(me_rgb);
%convert from rgb into an index
[me_ind, me_map] = myrgb2ind(me_rgb);
% and back again
new_rgb = myind2rgb(me_ind,me_map);
%check that the two images are the same == lossless
assert (isequal(me_rgb, new_rgb), '@ta: matrix going in doesnt equal the one coming out');
%display the outputted image
figure
imshow(new_rgb);

Here, the assert function demonstrates that the rgb image coming out is the same as the one going in. If you tried this with the MATLAB function for rgb2ind and ind2rgb, you will not get the two to be equal unless there are less than 65536 colors (which is the max number of colors defined for rgb2ind).