Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 215

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));
``````
0
ZURINET
• 3
1 Solution

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

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

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

## Featured Post

• 3
Tackle projects and never again get stuck behind a technical roadblock.