help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Load F2m polynomial from binary string


From: Jeffrey Walton
Subject: Load F2m polynomial from binary string
Date: Fri, 11 Jan 2019 12:08:36 -0500

Hi Everyone,

I am having trouble loading F2m polynomial from a string.

I believe the manual pages are at [1] and [2] but I don't see a
discussion of how to load a F2m polynomial from a string.

How do I load the F2m polynomial from a string?

Thanks in advance.

=====

>> r = gf([100000000000000000000000000000000000000000000000000000000000001
1]);
>> r = gf([100000000000000000000000000000000000000000000000000000000000001
1]);
error: gf: data outside range of Galois Field GF(2^1)
error: gf: data outside range of Galois Field GF(2^1)
>> r = gf([ "1000000000000000000000000000000000000000000000000000000000000
011" ]);
error: invalid conversion from string to real matrix
>> r = gf("100000000000000000000000000000000000000000000000000000000000001
1");
error: invalid conversion from string to real matrix
>> r = gf(['10000000000000000000000000000000000000000000000000000000000000
11']);
error: invalid conversion from string to real matrix
>> r = gf('100000000000000000000000000000000000000000000000000000000000001
1');
error: invalid conversion from string to real matrix

=====

I'm aware this works, but the strings I have are not in this format:

>> a = gf( [1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0
1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0] );

=====

[1] https://octave.org/doc/v4.0.3/Terminal-Input.html#Terminal-Input
[2] 
https://octave.org/doc/v4.0.3/Miscellaneous-Functions.html#Miscellaneous-Functions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]