We need to get real-time neural signal from Hitachi’s ETG4000. Hitachi provides a MatLab script “RealtimeOT” to get data from a parallel port and convert the binary data to float. Here is what they did:
fp=fopen('temp','w+');fwrite(fp,bindata);fseek(fp,-4,'cof'); floatdata =fread(fp,4,'float'); fclose(fp);delete('temp');
This piece of code will be called a few hundred times per second. Converting data using file is too slow. As a result, the signal we get is not real time at all (delay up to 10s). Indeed, there is a very simple way to do this (typecast):
floatdata=typecast(uint8(bindata), 'single');
Then the program runs very smoothly and there is no delay.
Receive email notification via email 博客有新内容通知我
Don't want to miss new papers in your field? Check out Stork we developed: ![]() |
专注医学生物类的论文润色 联系他们请用优惠码 STORK4,他们会给你折扣。 |
I have read 64 data from my serial port. each two bytes should be combined together to form one 16 bit data. So, what is the function that will make the operation to the whole data. Thank you.