crc16 checksum in matlab

조회 수: 24 (최근 30일)
Mohamed Jamal
Mohamed Jamal 2020년 8월 8일
답변: Steven Lord 2020년 8월 8일
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.

답변 (1개)

Steven Lord
Steven Lord 2020년 8월 8일

카테고리

Help CenterFile Exchange에서 Error Detection and Correction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by