Skip to Main Content Skip to Search
Product Documentation

Programming in MATLAB

MATLAB Programmer

RoleKnowledge BaseResponsibilities

MATLAB programmer
  • MATLAB expert

  • No IT experience

  • No access to IT systems

  • Develops models; implements in MATLAB

  • Serves as tool builder

  • Uses tools to create a component that is used by the Java developer

  • Uses tools to create a component that is used by the .NET developer

  • Uses tools to create a component that is used by the COM developer

  • Uses tools to create a component that is used by the C or C++ developer

MATLAB is an interpreted programming environment. You can execute functions directly at the command prompt or through an editor in saved files. Methods may be created, having their own unique inputs and outputs. When deploying a MATLAB function to other programming environments, such as .NET and Java, you must contain your MATLAB code within functions. MATLAB Compiler does not allow you to use inline scripts.

The following examples demonstrate how to perform basic MATLAB programmer tasks for deployed applications; they do not attempt to represent every way a MATLAB programmer can interface with MATLAB. Upcoming topics demonstrate how to use various data types in deployed applications. For more specific information about any of these data types, see the documentation for the product you are using (MATLAB Compiler, MATLAB Builder JA, or MATLAB Builder NE)

MATLAB Programming Basics

 Creating a Deployable MATLAB Function

 Taking Inputs into a Function

Returning MATLAB Data Types

MATLAB allows many different deployable data types. This section contains examples of how to work with figures. For an in-depth explanation of how to work with MATLAB primitive data types, see the MATLAB External Interfaces documentation.

MATLAB Figures

Often, you are dealing with images displayed in a figure window, and not just string and numerical data. Deployed Web applications can support figure window data in a number of ways. By using the WebFigures infrastructure (see Deploying a Java Component Over the Web in the MATLAB Builder JA User's Guide or Web Deployment of Figures and Images in the MATLAB Builder NE User's Guide), the respective builder marshals the data for you.

Alternatively, you can take a snapshot of what is in the figure window at a given point and convert that data into the raw image data for a specific image type. This is particularly useful for streaming the images across the web.

 Returning Data from a WebFigure Window

 Returning a Figure as Data

 Reorienting a Figure and Returning It as Data

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS