Tampilkan postingan dengan label My projects. Tampilkan semua postingan
Tampilkan postingan dengan label My projects. Tampilkan semua postingan

Sabtu, 18 Februari 2012

How to call Matlab functions from a Java program

Matlab is a very reputed piece of software specially among researchers and graduate students. It allows users to code complicated algorithms thanks to its rich libraries that implement many mathematical functions and statistical models. You may have ever used it to implement some classification processes that deals with heterogeneous data and you have got some interesting results and you wanted to show it to a client. He may not be interested in your statistical model nore in your charts and graphs. He is interested in a beautiful application with an ergonomic user interface with big shiny buttons that allow him to use you piece of program. He is interested in the usability of your program more than the academic process that allowed you to get your result.

So to make this happen, you need to implement a simple prototype that calls your Matlab functions and show resluts in a simple GUI. If you're a Java savvy, or you prefer java to make this happen you need to use the MatlabControl API. It's a simple Java API that allows you to call Matlab functions and execute eval, feval and other commands.

All you need to do is to download the jar file and add it to your classpath and use this code to open a Matlab session.



MatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder()

.setHidden(true)
.setUsePreviouslyControlledSession(true)
.build();

MatlabProxyFactory factory = new MatlabProxyFactory(options);

MatlabProxy proxy = factory.getProxy();

After that you need to change your Matlab current path to your Matlab script path using CD command and then you can execute call your function:

proxy.eval("cd C:/Users/MyName/Desktop/MyScriptFolder");
proxy.eval("myFunction('"+param1+"','"+param2+"',intParam)");

If you need other details about variables and parameter you can use the API Walkthrough or check out the API Javadocs.


Selasa, 14 September 2010

Web-Desktop Application for Network Monitoring and Alert Management.


Currently, computer networks are the backbone in the remote communication. Now they have become essential for the proper functioning of many domains and applications. Their rapid growth induces increased complexity of administration tasks and fault detection. Any problems or failure may have serious consequences forcing the use a system of monitoring and alert management.

The network monitoring has become therefore a major task not only the ensure the system retention and good functionality but also to have a global view on problems that may occur to prevent their appearance. As the task of the administrator is to ensure the smooth functioning of its network and manage heterogeneous devices, administrators were then forced in the past to work on a machine connected to the network which makes their task more difficult and may risk delaying critical tasks. Thanks to advances in technology and the evolution of the Web, this monitoring task has become more flexible.

In fact, the administrator is now able to monitor its network remotely via a web application that provides network monitoring and is capable of describing its condition and report alerts when this is necessary. Hence, it can remedy problems and resolve them as quickly as possible.

Indeed, this application starts with the automatic detection of network equipment (Routers, firewalls, terminal) which allows to draw the map showing equipment found to give the administrator a clear view on its network. The administrator can also predefine the annoying problems that which he judges to be important to be notified when they occur. Once one of these problems is encountered, an alert will reported to the administrator to inform him about the problem detected, its severity and its location so that he becomes able to correct it immediately.

The main objective of this project is to develop a web application for network monitoring and effective management of alerts. This application should be able to monitor services and network resources (routers, terminals). The following video is a demonstration of the project.



Related Posts Plugin for WordPress, Blogger...