NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
pkad
Posts: 11
0 Kudos

matrixx and matlab/simulink

Hi,

Currently does MATRIXx interface directly with Matlab and Simulink?

Thanks
Member
Posts: 152
0 Kudos

Re: matrixx and matlab/simulink

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
Member
pkad
Posts: 11
0 Kudos

Re: matrixx and matlab/simulink

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
Member
Posts: 152
0 Kudos

Re: matrixx and matlab/simulink

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
Member
Ian450
Posts: 4
0 Kudos

Re: matrixx and matlab/simulink

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
Member
MM_1
Posts: 5
0 Kudos

Re: matrixx and matlab/simulink

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 :smileysurprised:)

 MM

Member
BobPizzi
Posts: 17
0 Kudos

OOP within MATRIXx (was: matrixx and matlab/simulink)

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

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page