#Matrix NxN
import pandas as pd
import numpy as np
nxn = pd.read_csv('input_1/nxn.csv', delimiter=';')
nxn = nxn.apply(lambda x: x.str.replace(',','.'))
nxn = nxn.to_numpy()
nxn = nxn.astype(np.float)
nxn
#Matrix NxH
nxh = pd.read_csv('input_1/nxh.csv', delimiter=';')
nxh = nxh.apply(lambda x: x.str.replace(',','.'))
nxh = nxh.to_numpy()
nxh = nxh.astype(np.float)
nxh
#Vector Xh
from numpy import array
Vector = array ([500,300,300])
Xh = np.array([500,300,300])
array([500,300,300])
Xh.shape = (3,1)
Xh.astype(np.float)
Xh
print(Xh)
#Vector V
V = np.random.normal(100, 0, 192)
V.shape = (192,1)
print(V)
#Vector e
# numpy.random.normal() method
e = np.random.normal(0.0, 5.0, 192)
e.shape = (192,1)
print(e)
#Xn1 = nxn * ( V + e ) + nxh * Xh
Xn1 = np.dot(nxn, (V+e)) + np.dot(nxh,Xh)
pd.DataFrame(Xn1).to_csv("output_1/Xn1.csv",index=False, header=False)
Xn1