MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

matrixx and matlab/simulink

Hi,

Currently does MATRIXx interface directly with Matlab and Simulink?

Thanks
0 Kudos
Message 1 of 7
(14,799 Views)
pkad,

In short, not really. MATLAB uses a somewhat different data strucutre based around Matricies, while MATRIXx is built around a more robust object-oriented model for programming.  Because of these differences, the code is not quite compatible (although fairly similar in syntax).  So, don't expect to be able to open MATLAB code in Xmath and be able to run it.

That's not to say it's impossible to combine say two models in a hardware-in-the-loop implementation. LabVIEW, for example, has support for integrating code from both of these platforms, and with a little work, can serve as a communication gateway of sorts between the two.  Additionally, compiled code from the two environments can be made to work together as DLLs talking to each other.

Hope this helps.
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 2 of 7
(14,768 Views)
Hi Paul,

Since Xmath has the LNX api while SystemBuild has the UCB api, would it be possible to import and export models that were developed within Matlab/Simulink?

Thanks
0 Kudos
Message 3 of 7
(14,746 Views)
pkad,

It is not currently possible to import and export models to Simulink.  It has been a requested feature and the developers are aware of the need. 

I suggest creating a product suggestion here: http://digital.ni.com/applications/psc.nsf/default?openform and this will get seen by the developers.

Thanks,
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 4 of 7
(14,727 Views)
If you simply need to import (not convert or translate) the Matlab and Simulink models you could do so by using The MathWorks tools that convert the models to C code.  Once the models are represented in C they could be called using the UCB and LNX tools.

Ian Fountain
National Instruments
0 Kudos
Message 5 of 7
(14,695 Views)

Hi....Is it possible to create my own classes using xmath programming language in MATRIXx?.....I tried with an evaluation copy of MATRIXx and could not find any command that creates user defined class.....is it because I have got evaluation copy?.....I know that it is possible to do it on MATLAB and also LabVIEW is not really an object-oriented programme although it has OOP toolkit.

 

Thanks in advance 🐵

 MM

0 Kudos
Message 6 of 7
(12,662 Views)

Xmath has the concept of a MathScript Object (MSO). It is "object-like" in the sense that you can create an 'object' (just another variable in Xmath) that contains its own instance data and implements functions and commands that take the MSO as a formal argument. Due to syntax and operations limitations, you have to think really generally about the OOP concepts and not focus on the features of particular implementations of OOP (like C++) when comparing MSO capability.

 

If you're thinking about porting ML classes, it's not likely to be a direct translation, but then again, it will depend on the sophistication of the the ML code you're starting with.

 

Check out the MSO chapter within the Xmath UserGuide (PFD document) and there is also an MSO help topic as well.

 

With a SystemBuild model, v7.x has a concept of a 'Component', which, like MSO, thinking generally about OOP, might be considered somewhat OOP. It is a more of a sophisticated model hierarchy re-use mechanism. In v8, this feature is removed awaiting an upgraded replacement.

 

bob

0 Kudos
Message 7 of 7
(12,615 Views)