09-24-2019 06:39 PM
I am attempting to write a 22 channel array to a binary file. Each single-precision number in the array should be 4 bytes, so after writing to the file, I expect it to be 88 bytes in size. However, when writing the whole array to the file, it comes out to 92 bytes. I am not sure where the extra 4 bytes are coming from.
When I index the array and write each data point separately, it gives me the result I want (88 bytes). Ideally, I would like to be able to write the whole array rather than each point. Any idea what is going on here?
Solved! Go to Solution.
09-24-2019 06:56 PM
If you're writing an array, then it's probably adding in a header for the array that specifies the size. Check the first 4 bytes, it probably decodes to 22 and then the rest of the data matches your data exactly.
09-24-2019 07:02 PM
Yup, i was missing a false on the "prepend array or string size?" input for the write to binary file function