목록분류 전체보기 (295)
UOMOP
BCH Decoder function Mhat = BCHdecoder(R, K, t) R = mod(R, 2); N = length(R); m = log2(N+1); a = gf(2, m); S = []; for i = 1 : 2*t S = [S GetSyndrom(R, a^i)]; end S = gf(S, m); Sk = gf(zeros(t, t+1), m); for x = 1 : t for y = 1 : t+1 Sk(x, y) = S(x+y-1); end end Sm = Sk(: ,1 : t); Sv = Sk(:, t+1); Sigma = inv(Sm) * Sv SigCoeff = [1 flip(Sigma')] Beta = []; for i = 1 : N sig_a = GetSyndrom(SigCoe..
1. csv파일을 불러오기 import numpy as np import pandas as pd titanic_df = pd.read_csv("titanic_train.csv") titanic_df.head(3) print("\n ### titanic_train.csv Data ### \n") print("-"*40) print(titanic_df.info()) # info()함수는 컬럼 별 "이름", "# of Null","data type"을 보여준다 ### titanic_train.csv Data ### ---------------------------------------- RangeIndex: 891 entries, 0 to 890 Data columns (total 12 columns): # ..
RS Encoder function U = RSEncoder(M) K = length(M); m = M.m; N = 2^m-1; DegPoly = N - K; P = flip(rsgenpoly(N, K)); LFSR = gf(zeros(1, N-K), m); U = gf(zeros(1, N), m); U(N-K+1:N) = M; for i = 1 : K feedback = LFSR(DegPoly) + M(K-i+1); for j = DegPoly : -1 : 2 LFSR(j) = LFSR(j-1) + feedback*P(j); end LFSR(1) = feedback * P(1); end U(1:(N-K)) = LFSR; RS Decoder function Mhat = RSDecoder(R) a = gf..
List, Tuple, Dict에 대한 Python Built-in 확장 자료 구조 아래의 모듈이 존재 from collections import deque from collections import Counter from collections import defaultdict from collections import namedtuple 1. deque from collections import deque d = deque([2, 3, 4, 5]) print(d) d.append(6) print(d) d.appendleft(1) print(d) d.pop() print(d) deque([2, 3, 4, 5]) deque([2, 3, 4, 5, 6]) deque([1, 2, 3, 4, 5, 6]) deq..
1. List(리스트) a = [1, 2, 3, 4, 5] a.append(10) a.append(20) print(a) [1, 2, 3, 4, 5, 10, 20] a.pop() print(a) a.pop(0) print(a) a.pop(2) print(a) [1, 2, 3, 4, 5, 10] [2, 3, 4, 5, 10] [2, 3, 5, 10] a.insert(0, 1) print(a) a.insert(3, 4) print(a) # 앞에는 자릿수, 뒤에는 설정숫자 [1, 2, 3, 5, 10] [1, 2, 3, 4, 5, 10] 2. tuple(튜플) 값의 변경이 불가능한 리스트 선언시 "()"를 사용 리스트의 연산, 인덱싱, 슬라이싱 등을 동일하게 사용 t = (1, 2, 3) print(t[1])..
function Mhat = cyclicdecoder(R, P, T) %usage : received vector(R), 생성 vector(P), syndrom(T)을 이용하여 massage(M)을 도출 %input : R=received massage, P=생성다항식계수, T = syndrom Table %output : M = only massage using decorder K = length(R); N = length(P)+K-1; DegPoly = N-K; LFSR = zeros(1, DegPoly); a = K-(N-K); for i = 1 : a feedback = mod(R(K+1-i)+LFSR(N-K), 2); str = sprintf('Input mesag : %d \nCurrent L..