Double inputs must have integer values in the integer range when mixed with integer inputs.

8 次查看(过去 30 天)
Double inputs must have integer values in the integer range when mixed with integer inputs.
Error in Encryption_Decryption_total_process.m (line 118)
xorr1(1,i)=bitxor(column_image(i),m(i));

回答(1 个)

Guillaume
Guillaume 2019-3-8
The error is fairly clear. Either column_image or m is of type double while the other is an integer type. And the value at index i of that double is either not an integer or an integer outside the valid range of the integer type.
The values of the double array must be in the range
theintegertype = 'int8'; %replace by actual type
validrange = [intmin(theintegertype), intmax(theintegertype)]
If you were expecting your double to have the same range as the integer type, then you need to find the bug in your code. Otherwise, you'll have to use a larger integer type.

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by