Difference between revisions of "AnyWave:WriteMatlabScripted"

From WikiMEG
Jump to: navigation, search
(Introduction)
Line 14: Line 14:
 
[[File:Matlab1.png|left]]<br/>
 
[[File:Matlab1.png|left]]<br/>
 
As shown in the image above, a MyPlugin folder has been created and a main function was added.<br/>
 
As shown in the image above, a MyPlugin folder has been created and a main function was added.<br/>
 +
<br/>
 +
We are now ready to write our first Matlab plug-in but before doing that we will cover all the functions provided by AnyWave.<br/>
 +
To get or put data from/to AnyWave, special functions are provided.<br/>
 +
We can call the set of functions the AnyWave-MATLAB API.<br/>

Revision as of 10:26, 17 April 2014

Introduction

This section targets people who have a good knowledge and practice of Matlab language.
The purpose is to explain how to write a Matlab function that will be available to AnyWave.
The function will be executed by MATLAB after a connection to AnyWave has been established.
We will cover the AnyWave-Matlab API (Application Programming Interface) and develop examples through tutorials.

Where to start?

The first thing to do is to create the basic structure for a plug-in.
A Matlab Scripted plug-in is very simple, it is a folder containing at least two files.

Let's begin by creating a folder somewhere on the computer, called MyPlugin.
This can be done in MATLAB: create a folder and create a new function called main in that folder.
The main function is MANDATORY. It will be the main function AnyWave will call to execute our plugin.

Matlab1.png

As shown in the image above, a MyPlugin folder has been created and a main function was added.

We are now ready to write our first Matlab plug-in but before doing that we will cover all the functions provided by AnyWave.
To get or put data from/to AnyWave, special functions are provided.
We can call the set of functions the AnyWave-MATLAB API.