I write this simple code,but I catch multiple errors.
v0[t]=abs(values_list[k]-list(x1)) TypeError: unsupported operand type(s) for -: 'complex' and 'list'
I appreciate any help.
x1=[1.5+1.2j]
import numpy as np
import matplotlib.pyplot as plt
import math
mapping = {
(0,0,0,0) : -3-3j,
(0,0,0,1) : -3-1j,
}
modulation=4
values= mapping.values()# extract values
values_list = list(values)# tuple to list
print(values_list[0])
v0=[0,0]
t=0
for k in range(2):
v0[t]=abs(values_list[k]-list(x1))
print(k)
question from:https://stackoverflow.com/questions/65952845/issue-in-conplex