LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ask a question about CDB data type storage format

According to the information I found, CDB means complex number, double precision floating-point type, my understanding is that the width of the real part and the imaginary part both are 64 bits, then the width of a CDB is 128 bits (that is, 16 bytes)

 

I convert CDB array into CSG in LabVIEW, and then save it as bin file, which can be read correctly in MATLAB, as shown in Figure 1.

However, if I directly save the CDB array as a bin file and read the file in MATLAB (see Figure 2 for parameter configuration), the data obtained is incorrect.

Please point out why?

Download All
0 Kudos
Message 1 of 2
(1,080 Views)

The Write To Binary File, by default, prepends the array length (I32).  That might be causing a file offset error.  There is a Boolean input on the Write To Binary File to remove that.

 

Note that you are getting this error with both of your files.  It is just not as obvious with the CSG file since a single value is 2 32-bit values.  So you signals are probably actually flipped.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(1,071 Views)