Friday, 12 August 2011

Matrices

Matrices is a square or rectangular array which can be used to store a wide variety of number. It has a wide applications in mathematics , engineering and physics too. It is first mentioned in mathematics literature paper by James Joseph Slyvester,  the word matrix itself meant "a place which something is bred, produced or developed".

How it is applied in real life ?
Although it may not seems to be apparent in our life but it is there, lets say, we had 2 friends named Mr Sci and Mr Lab, one of them is purely vegetarians and one of them is erm.. carnivore (who likes to eat meat with bit of homemade tomato ketchup). So Mr Sci bought 4 kg of tomatoes and absolutely no meat meanwhile Mr Lab bought 1 kg of tomato with 3 kg of meats. Hence, how you can draft in in matrices ? Below is one of the examples.  We first draft it into a table such as follows ...


Tomato Meat
Sci 4 0
Lab 1 3


and then draft it as followings


This whole things included brackets is known as matrix, but if you want to be more specifics, it is two by two matrices. 

So, in Scilab, you just need to do this ...

//Displaying matrices in Scilab

//If you need to add extra column, just add 
//semicolon ";" to separate between columns

//So if your matrix is like this

M = [4,0;3,1]

//It will shows 
// 4      0
// 3      1

That is all for today. :]

(P.S: I don't know what is happened with Blogger . Suddenly , I can't post snippets today!)


Tuesday, 9 August 2011

Knowing Scilab

I assume now you are experimenting a bit on the Scilab but if not, I will explain it to you the components that make the Scilab works anyway. Below is a screenshot of the Scilab console with some highlighting.


As you can see, it is pretty minimalistic with the red marking on top is the menu bar which makes Scilab works and the blue highlighted below is the workspace which where the Scilab source code can be directly run in here.
By the way, you should see something like above, if you see any error messages, it is wise to reinstall again or even re-download the whole Scilab install files (which are maybe corrupted in your hardisk).

Now, let us discover what of this each icons in red highlighting do...

This icons represents Open SciNotes pad where you can type the equations without fearing for typing mistake which will be encountered if it is entered in Scilab consoles.

This icons represents Open File which let user opens up their already created Scilab files which are in sci or sce format.

This icon represents the Cut,Copy and Paste functions which probably you are familiar with. 

This icon represents change directory icons and although it may seems like it is open file icon but never ever change the default directory settings.

This icon represents changing the font used in the Scilab console

This icon functions to print out your source code on paper

This icons is to let you manage (install/update/uninstall) the external toolbox modules which are not available in the Scilab core files

This icon is Xcos which lets you design a system/model using the block diagram (but as of version 5.3.2, there are some bugs which are not yet fixed)

This is Scilab demo icon which you can run a few Scilab examples  (but again there are few bugs with some of the examples, especially some of the Xcos examples)

 and of course the help files ! :P

That is all for now ...