Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

help needed

Status
Not open for further replies.

Ali768

Nuclear
Dec 6, 2004
11
Hi

I am a beginner in MATLAB. I have to develop a code in which I have to read two text files separately containing a column vector each (the vector size can be between 300-400, containing the decimals numbers). Once data is read as txt files I have to perform the following mathematics on it

A(0) = x1*y1 + x2*y2 + x3*y3 + …… + xN*yN
A(1) = x1*y2 + x2*y3 + x3*y4 + …… + xN*yN+1
A(2) = x1*y3 + x2*y4 + x3*y5 + …… + xN*yN+2
.
.
.
.
A(J) = x1*yJ + x2*yJ+1 + x3*yJ+2 + …… + xN*yN+J

Where x1, x2,...., xN is the first column vector file and y1,y2,...., yN+2 is the second vector file.

The result of the above mathematics will be third column vector file of A(0), A(1), A(2), ….. A(J) which can be saved a output txt file.

Any help in code development will be highly appreciated as I tried to do it myself but due to beginner still finding hard to get it right.


ali
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor