Read Unformatted SD Card in Matlab

6 次查看(过去 30 天)
I have raw data that was stored by an 8-bit micro-controller onto an unformatted SD Card. In the micro it treats the SD Card as a large unified flash file and will write bytes accordingly into SD Card memory. I now want to analyze the data in Matlab and I can't seem to find a work around for opening the SD Card as 1 large binary file. Windows recognizes that the SD Card is not formatted and therefore will not browse to the file in windows explorer. I've created a C# program that will open the SD Card using the CreateFile method and supplying \\.\PYISCALDRIVE1 as the file to open, the SD Card happens to be the 2nd drive on my computer. I can then write the file out as a text file but I would like to do this all from within Matlab if at all possible. 3rd party programs such as winHex can open the unformatted SD Card so it is a least possible for programs to access the file.
Any ideas on how to do this all from within Matlab?
Thank you

采纳的回答

Philip Borghesani
Philip Borghesani 2013-9-19
This probably can't be done entirely within MATLAB. I suggest turning your C# code into a library that can be accessed using the MATLAB .net interface or if you also know c writing a mex file to access the data.
  1 个评论
David
David 2013-9-19
I was afraid that was going to be the answer, I can compile into a DLL or mex the function in C so that shouldn't be a problem. I was just hoping for a Matlab work around. Thank you for the response.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by