Hi all

How can I solve the give vectors ..
Mathmatically with the help of Java?
double[] weight = {5.0, 3.0, 0.0};
double[] sample = {1, 2, 3};

double inFu   = 1.00;
double vLearn = 0.10;

double[] newVector;
newVector = (weight + inFu * vLearn * (sample - weight));
Who is Participating?

Commented:
I think there was an extra parenthesis before

double[] weight = {5.0, 3.0, 0.0};
double[] sample = {1, 2, 3};

double inFu   = 1.00;
double vLearn = 0.10;

double[] newVector = new double[3];

for (int j=0;j<3;j++)
newVector[j] = (weight[j] + inFu * vLearn * (sample[j] - weight[j]);
0

Commented:
double[] weight = {5.0, 3.0, 0.0};
double[] sample = {1, 2, 3};

double inFu   = 1.00;
double vLearn = 0.10;

double[] newVector = new double[3];

for (int j=0;j<3;j++)
newVector[j] = (weight[j] + inFu * vLearn * (sample[j] - weight[j]));
0

Author Commented:
Hoi for Yan
Thanks a lot
0

Commented:
You are always welcome.
I hope you were not offended by my remark.
I really wanted to share my feelings and make all of our interactions more fruitful.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.