Showing posts with label information visualization. Show all posts
Showing posts with label information visualization. Show all posts

Mar 27, 2012

Matlab Cell Array

Cell arrays is a tabular data structure in Matlab, useful for storing heterogeneous objects whereas arrays can hold only homogeneous objects. Elements in cell array can have different dimensions as well. Elements of cell array, called cells, can contain
  • numeric arrays
  • strings
  • structures
  • cell arrays
Following example code creates and populates a cell array :

A = {['1st element'] [2 3] [8 9 7; 1 2 3] ['a' 'b']};


Index is written within curly braces e.g. A{1} to access the elements of a cell array. To recursively display the contents of a cell array, celldisp function can be used. For example, celldisp(A) produces the following result


A{1} =

1st element


A{2} =

2 3



A{3} =

8 9 7
1 2 3



A{4} =

ab



The contents of a cell array can be visualized with cellplot function, cellplot(A) would produce the following visualization.



This entry on mathworks blog can be consulted for farther information.

May 16, 2011

Visualizing Genetic Algorithms 1

I've started working on a Genetic Algorithm visualizer tool. The primary goal is to visualize every individual (suboptimal solution) in every generation till termination of the algorithm. Each individual is assigned an unique ID which, along with the individual's parents' IDs can be seen on top left corner of each icon. The number at the bottom left corner is the fitness value of the individual. Apart from this, average fitness, best fitness of every generation are also plotted. Using C++ and OpenGL to build the visualizer tool.



In the picture above, I'm trying to breed a regular pentagon starting with initial population of 20 randomly generated pentagons. The fitness function used here is the standard deviation of distances of the vertices from a point inside the pentagon. Here we can see the 11 generation of pentagons on the same page. I will be posting more updates.

Dec 30, 2010

Video of Information visualization workshop at SUST

This is a video clip of me teaching a class at the Information visualization workshop in SUST at 28th February 2010. This clip only shows Halo among the many information visualization techniques I discussed about.



Hope this will be helpful to my students. Apologies for not so good videography.