I have a set of 3 complex vectors, I want to a find a linear combination of these vectors that would amount to an offset (y = c) - like an array with all elements equal to each other, within a tolerance.
find a, b, and c such that
a*vectors[0] + b*vectors[1] + c*vectors[2]
is equal to
np.ones_like(vectors[0])*R
where R is some complex scalar.
And then I need to repeat this, but with the constraint being a tilt instead of an offset (y = mx)
I have been staring in despair at scipy.optimize functions but have no idea where to begin. I thought I could use curve_fit where X is my vectors array, and Y is the offset, but R could be anything. I have looked at a lot of questions on this website about finding linear combination of vectors to get a set target, all involving least squares algorithms and regression, but in these questions, the target is always very clearly set, and mine is not.
Any help would be appreciated.
If it helps, here is the vector array:
vectors = [[-0.05595785+0.j -0.02067704+0.96237886j 0.01788292+0.91801663j
0.01638632+0.89043662j -0.00940294+0.86416253j -0.04124763+0.84856943j
-0.07209872+0.84014654j -0.09694049+0.84415515j -0.11041203+0.87747744j
-0.11280149+0.90039313j -0.11049056+0.91109975j -0.11048226+0.90795703j
-0.11858175+0.90167201j -0.12435044+0.91616836j -0.13327415+0.92503116j
-0.15029659+0.92995771j -0.18068274+0.93675527j -0.219918 +0.96426471j
-0.23302548+1.03547945j -0.20804073+1.10629325j -0.16236329+1.1410909j
-0.1395226 +1.14736029j -0.13274937+1.17171783j -0.08154881+1.21819715j
-0.01260256+1.22220135j 0.02440899+1.19255107j 0.03181309+1.17177358j
0.04052842+1.16086606j 0.06229635+1.15418931j 0.07827962+0.j ]
[ 0.13960754+0.j 0.15883152+0.61495684j 0.29275993+0.7951821j
0.50531005+0.92696802j 0.74459812+0.94749429j 0.94302144+0.85065558j
1.03815336+0.69669179j 1.05760245+0.56690778j 1.08602193+0.47764643j
1.0860309 +0.38319665j 1.04421356+0.31078688j 0.99800496+0.28223413j
0.97584298+0.26824647j 0.98367673+0.25180156j 1.00149139+0.24309192j
1.04185799+0.2276887j 1.10064048+0.18885346j 1.17160345+0.10190804j
1.22166034-0.06962931j 1.16705674-0.26264473j 1.02869959-0.385853j
0.89500481-0.41972091j 0.80761405-0.43157533j 0.71985933-0.47264141j
0.60330173-0.47872411j 0.51106118-0.42849817j 0.47229649-0.36894518j
0.45982437-0.33598009j 0.44241121-0.33143811j 0.4125255 +0.j ]
[-1.34717439+0.j -1.85723443-0.63216626j -2.14169716-0.06585348j
-2.08677468+0.54603237j -1.71793861+0.96084092j -1.26443764+1.11681916j
-0.85229978+1.08715208j -0.53386952+0.94652411j -0.33258462+0.78905829j
-0.19739978+0.62879446j -0.10777746+0.4756731j -0.05964638+0.33944905j
-0.04163412+0.23675148j -0.0319222 +0.18115283j 0.00295115+0.16393733j
0.09306699+0.14214935j 0.20598206+0.06257386j 0.29090676-0.06831863j
0.33007931-0.24142598j 0.28082543-0.42363605j 0.15973201-0.53559239j
0.05068626-0.57177554j -0.03386762-0.59290642j -0.139633 -0.605745j
-0.24763383-0.57102344j -0.32101282-0.49963981j -0.36026907-0.42238967j
-0.3792613 -0.34209787j -0.379106 -0.25523545j -0.34043382+0.j ]]
y,mandxare?Rknown? It seems that it isn't; do you know of any bounds?