I'm trying to interface a digital sensor to my computer via MATLAB.
I first send a request for data to the sensor, then the sensor replies with a six byte stream.
MATLAB reads the sensor like this:
data1 = fscanf(obj1, '%c', 6);
I know exactly what the contents of the data is supposed to be, but I don't know how to read the data in the packet that MATLAB produced.
The packet (data1) is simply 6 bytes, but how do I access each individual element as an integer?
I've never touched MATLAB programming before so I'm kind of lost.
Side question: What do MATLAB's data formats %c, %s, %c\n, and %s\n mean? I tried searching for it, but I couldn't find anything.