File Exchange Pick of the Week

November 14th, 2008

Interfacing MATLAB and SAS

This morning, a customer wrote to ask me about the best way to interface MATLAB with SAS. Now, I've been using MATLAB for about 14 years, but it's been about that long since I last touched SAS. And I've never tried to interface the two.

What to do?

Whenever I'm faced with a challenge of this nature, my first stop is usually Google. (Isn't it everyone's?) So I Googled "MATLAB SAS" and was very pleased to see that the first "hit" was for a white paper by Dimitri Shvorob entitled "The Twain Shall Meet: Facilitating Data Exchange Between SAS and Matlab."

null

We'll forgive Dimitri here for his improper capitalization of "MATLAB"; his paper provides a nice overview of how to use a MySQL database as "conduit" to facilitate the interchange of data, and underscores the power of the File Exchange (and more broadly, of Google, and of the Internet!) to find solutions to commonly faced problems. It's clear from Dimitri's paper that he knows his way around SAS, and I'm pleased that he chose to share his knowledge on MATLAB Central. In fact, accompanying that paper were two additional files of note: Import data from SAS and Export data to SAS. This suite of files is Brett's choice for this week's Pick of the Week.

Let us know here if you've solved "interfacing problems" of this nature--particularly ones you haven't (yet) shared on the File Exchange!


Get the MATLAB code

Published with MATLAB® 7.7

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Zach: Hi Doug and Les, I didn’t have a lot of time to mess with this, but I did find a work-around. I plotted...
  • hamed: k
  • Les: @Zach This isn’t exactly what you are looking for but at least it puts all three parameters on the same...
  • Zach: Thanks for your suggestions Doug. I’ll give that a shot and see what happens. I’ve seen many of...
  • Doug: @Zach, I would say to use plotYYY, because that is close to what you want, but using depth as Y makes sense....
  • Doug: @Teja, I think this will work: http://www.mathworks .com/access/helpdesk /help/techdoc/ref...
  • Gify: merry christmas :) nice christmas tree! Regards, Janet Gify
  • Teja: Dear Doug Is there anyway to plot a surface from nonuniform data without meshgrid and griddata? Basically i...
  • Zach: I’m working with geophysical data, so I’d like to produce a depth profile. The y-axis would be...
  • Doug: @Ashok First, please do not use variable names that are MATLAB commands (std and mean). Second, p(j) should be...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.