• 0
kridnix

Analog Discovery 2 and Matlab

Question

I hear you may be working on at Matlab interface for the AD2 but in the meantime it seems it would be possible to use the API in the SDK to talk to the AD2 directly.  I am somewhat new to this and can see two ways to go.  One would be to use VISA which Matlab supports through the instrument control toolbox.  However when I install NI VISA I can't detect the AD2 so maybe it isn't VISA compatible?  Am I missing something here?  Another way would be to use the included Python scripts and call Python from Matlab (http://www.mathworks.com/help/matlab/call-python-libraries.html).  This seems a little clunkier.

Of course this is a waste of time if you are coming out with Matlab support for the AD2 in the near future.  If not any advice on the best way to proceed would be appreciated.

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

@kridnix,

How about using a mex file?  A mex file is a C program compiled into a matlab library that can be called by a matlab command.  If you look into the matlab help files, there's ways to pass data both into a mex file and back out of it.

Dan

Share this post


Link to post
Share on other sites
  • 0

Another possibility is to switch from using matlab to using Python with scipy and matplotlib, which provides much of the matlab functionality (without needing a matlab license).  I've not tried the SDK with python, but it is supposed to work.

Note: I'm proposing this as a workaround, not as a real solution to interfacing to matlab.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now