crc16 checksum in matlab
28 ビュー (過去 30 日間)
古いコメントを表示
Hi guys
Im trying to implement a function that check the checksum of my input, and return if it's false or true (valid or not valid).
crc is crc16 that I input to my function an array that every value is an unsigned decimal value (Byte value, unsigned integer) like arr1=[1, 2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 10] , and my crc is the last two bytes , so I want to verify if my crc is valid by check the checksum of my arr1(implcitly its data of my packet), the other bytes (values) in my array arr1 is the payload data so here in my example the paylaod is [1 ,2 ,3 ,4 ,5 ,6 , 7,8] and the crc is the two last bytes(values) [9,10] .
how can I in matlab calculate the checksum of my given packet (in other words arr1) if the data is valid or not valid by checking the checksum? the checksum if zero this means ok, otherwise it's not valid.
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Error Detection and Correction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!