Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Is there a dataset both matlab and VC++ can use?

Asked by C Zeng on 27 Feb 2013

Hello, want to program to store a result to file, which dataset can both Matlab and C++ read?

I know Matlab can save it to .mat file but C++ may not be able to read it.

Thanks.

0 Comments

C Zeng

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 27 Feb 2013
Accepted answer

If you want a true database, there is the Database Toolkit.

But if you are talking about .mat files, then

  1. Yes, you can program C++ to read .mat files; but
  2. it is usually easier to transfer the data in binary such as by using fwrite()

7 Comments

C Zeng on 3 Mar 2013

OK, thanks. Will be careful on it. I do not think it affect me too much. :)

Walter Roberson on 3 Mar 2013

So if you address A(I,J) in MATLAB, it would be A[J][I] in C

C Zeng on 7 Mar 2013

Thanks, Walter!

Walter Roberson

Contact us