Hello there. I've got a question:
I have text a file made by N^2 lines. i need to create from it a NxN matrix. is there a function to do it? i hope so!
than you!
Akis
|
|
0
|
|
|
|
Reply
|
akismitracos (1)
|
10/14/2010 6:33:05 AM |
|
Akis <akismitracos@gmail.com> wrote in message <1995775092.104231.1287052415202.JavaMail.root@gallium.mathforum.org>...
> Hello there. I've got a question:
> I have text a file made by N^2 lines. i need to create from it a NxN matrix. is there a function to do it? i hope so!
>
> than you!
>
> Akis
Yes there are many functions.
Start by importing the file with textscan and then ask a more specific question with a brief example of your input and the desired output.
Oleg
|
|
0
|
|
|
|
Reply
|
Oleg
|
10/14/2010 10:57:03 AM
|
|
Dear
> I have text a file made by N^2 lines. i need to create from it a NxN matrix.
You can use TEXTREAD, TEXTSCAN or FSCANF to get a N^2 vector. Afterwards RESHAPE and perhaps TRANSPOSE let to bring this vector into a NxN shape.
Good luck, Jan
|
|
0
|
|
|
|
Reply
|
Jan
|
10/14/2010 10:57:03 AM
|
|