How to solve the code}
显示 更早的评论
How to find GF(2^m)
clc;
clear all;
close all;
x1='1100110011';
x2='1111001100';
y0='0000000000';
H ='1111011010'
yy= xor(y0-'0',x1-'0');
y1=gfmul(yy,H);
I got an error as this: Error using gfmul All inputs must be real integers.
Error in hash1 (line 11) y1=gfmul(yy,H);
What correction should i make?
1 个评论
KSSV
2017-10-23
Read the doc here: https://in.mathworks.com/help/comm/ref/gfmul.html gfmul accepts double i.e matrix as input. You are inputting a string and logical which is not correct.
采纳的回答
更多回答(1 个)
Walter Roberson
2017-10-23
y1 = gfmul(yy, bin2dec(H));
2 个评论
Darsana P M
2017-10-23
Walter Roberson
2017-10-23
gfmul needs three inputs, the third of which describes the galois field.
类别
在 帮助中心 和 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!