Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Reading custom-created file from C++ at Matlab

조회 수: 1 (최근 30일)
George Lazaridis
George Lazaridis 2014년 8월 4일
마감: MATLAB Answer Bot 2021년 8월 20일
I know the structure of the file that is created in C++ and i want to know if there is a way to read this file in Matlab. Can someone please explain to me how this is possible? I've tried fopen etc. but i just get an integer as a result after the reading process. Obviously i am doing something wrong.

답변 (1개)

George Lazaridis
George Lazaridis 2014년 8월 4일
This is the structure:
if true
% code
end
bw = New BinaryWriter(myStream)
bw.Write("My company ECG") // string
bw.Write("Version 1.0.0.0") //string
bw.Write("1001") 'String –Patient ID //string
bw.Write("001") 'String –Study ID //string
bw.Write("1") 'Integer –gender: 0 male,1 female //string
bw.Write("ECG") //string
bw.Write("500") //string
bw.Write("test") //string
bw.Write(datas_length) //long or int64
For i As Long = 0 To datas_length - 1
bw.Write(ChannelData(i)) //float
Next
bw.Write("Sample finished") //string
bw.Close()

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by