borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (calculating the difference between 2 dates)Next Topic (Need some help) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Dealing with Text file data as a matrix ! please need your help
Poster Message
Ghobashi
Level: Sage


Registered: 28-02-2003
Posts: 64

icon Dealing with Text file data as a matrix ! please need your help

Hello everyone
I need your help in the attached code
I managed to read two text files and and knew the number of their rows.
I would like to deal with the columns inside each file separately. In other way I would like to treat the text files as a matrix in rows and columns.
For example:
I want to make some mathematical operation and save the result in a new text file called NTF.
The operation may be like this:
NTF(1,1)=DTMM(1,1)+DTMM(1,2)+GRV1(1,3)
Pleas, I stuck with this step!

____________________________
with Respect

____________________________
Attached:
Testinput.zip 3 KB (Downloads: 1)

05-01-2008 at 04:29 AM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 954
icon Re: Dealing with Text file data as a matrix ! please need your help

Hi,
I've updated your project (attached) and added a few functions/modules and files:

TestA.txt and TestB.txt
These contain some sample matrix data in the same format as your txt files

modMatrix
Some routines to help:
Read a file into a double matrix,
Multiply 2 matrices
Dump a matrix to string/debug window

I've also updated the paths for your text files to use app.path.
Expand the file into a folder, it should all just run

Hope this helps
Kieron


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

____________________________
Attached:
testinput_updated_KWRA.zip 6 KB (Downloads: 1)

09-01-2008 at 01:06 PM
View Profile Send Email to User Show All Posts | Quote Reply
Ghobashi
Level: Sage


Registered: 28-02-2003
Posts: 64
icon Re: Dealing with Text file data as a matrix ! please need your help

Thank you very much!!
I will have a look

____________________________
with Respect

12-01-2008 at 08:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Dealing with Text file data as a matrix ! please need your help
Previous Topic (calculating the difference between 2 dates)Next Topic (Need some help) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder