views:

730

answers:

6

What exactly is MATLAB/Simulink? I've tried to understand it but have only gotten more confused in the process.

I know that you can write programs utilizing high-level industry-specific functions and algorithms but:

  • Is it a runtime where you can 'build' your code into an exectable program for a Client/Server?
  • Is it only a simulation environment, like LabVIEW, not to be used in production software/hardware?
  • Is it a code generation software, like compiler-compilers which does not really execute code itself?
+7  A: 

It is, mostly, a simulation and mathematical calculation environment.

During my education, we used it for spectrum analyses, sound processing and image processing. It is great for experimenting with such things; and resonably fast if used correctly.

It does have some features, such as the Matlab compiler, that allows you to take Matlab code and compile it to an executable.

driis
+1  A: 

MATLAB is an interpreted programming language and graphics environment suitable for solving mathematical and engineering problems. It contains highly optimised matrix and other mathematical functions, so it's not as slow as you might think if used properly. I believe that there is a "compiler" that can compile a MATLAB program into an equivalent C program, which can then be compiled to an executable.

I'm not sure what Simulink is exactly.

j_random_hacker
+2  A: 

MATLAB programs can be compiled to an executable which can be run on a machine on which the MATLAB runtime has been installed. This is a slightly untidy process that involves the executable unpacking a whole pile of files onto the hard disk. I believe there are a range of other options for distributing MATLAB applications and components (i.e. links into Excel, COM objects) but I've not had direct experience of them.

Ian Hopkinson
+1  A: 

In Matlab you can write applications which can be executed in matlab runtime environment. It can be real software for real purposes, at high school i wrote software which simulates LAN and WIFI network and simulates attacks.

with real time toolbox you can for example simulate or control real processes like assembly lines in car factory

back to your questions:

  • yes, it has runtime for client/server for example my network simulation program contains server which monitors network, computes statistics and control all network,and clients which simulates one or more computers in network

  • it`s simulation environment, but can be used in real production for particular purposes

  • and I don`t understand your last question

Cicik
+1  A: 

To answer the Simulink portion of your question, it is a simulation environment that mainly uses block diagram programming, much like LabVIEW. Simulink is an additional package beyond vanilla MATLAB, and can come with all sorts of further additional packages, called Blocksets, that have a library of blocks for a specific simulation area, like the Signal Processing Blockset or the Aerodynamics Blockset.

With the Real Time Workshop, you can design Simulink models of embedded software for custom hardware, then auto-code that model into C++.

Scottie T
+1  A: 

There is also a subset of the MATLAB language called Embedded MATLAB (EML) which will allow you to convert your M code to C code for embedded targets.

As well as simulation and generating C/C++ code, Simulink allows you to do verification and validation of your model.

MikeT