Matrix from a text fileWhy should text files end with a newline?How do I save a String to a text file using Java?How to append text to an existing file in JavaReading a text file into a matrixPython from matrix to simple text fileReading a specifically formatted text file into a 2d array/matrix in cRead number from file into a 2D matrixCreating a matrix from a text file - JavaHow do I loop through a text file and input that data into a matrixReading a matrix of numbers from a txt file
What's the most polite way to tell a manager "shut up and let me work"?
Orientable with respect to complex cobordism?
arcpy.GetParameterAsText not passing arguments to script?
How do I get a list of only the files (not the directories) from a package?
Asking for something with different prices
Can I ask a publisher for a paper that I need for reviewing
Coding Challenge Solution - Good Range
TV show or movie: Diseased people are exiled to a spaceship
Modern approach to radio buttons
Is having a hidden directory under /etc safe?
Can The Malloreon be read without first reading The Belgariad?
Why does the UK have more political parties than the US?
Looking for an old image of designing a cpu with plan laid out / being edited on a literal floor
What is the intuition behind uniform continuity?
California: "For quality assurance, this phone call is being recorded"
Accidentally cashed a check twice
Bringing Food from Hometown for Out-of-Town Interview?
Looking after a wayward brother in mother's will
Opposite of "Squeaky wheel gets the grease"
Why were the Night's Watch required to be celibate?
Beginner's snake game using PyGame
Is there any Biblical Basis for 400 years of silence between Old and New Testament?
How much current can Baofeng UV-5R provide on +V pin?
How can I grammatically understand "Wir über uns"?
Matrix from a text file
Why should text files end with a newline?How do I save a String to a text file using Java?How to append text to an existing file in JavaReading a text file into a matrixPython from matrix to simple text fileReading a specifically formatted text file into a 2d array/matrix in cRead number from file into a 2D matrixCreating a matrix from a text file - JavaHow do I loop through a text file and input that data into a matrixReading a matrix of numbers from a txt file
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Reads a matrix from a text file, the first line of the text file has the dimensions of the matrix, the next lines will contain the elements by rows separated by spaces. I was thinking about using this but don't know how to do the get from text file.
Dim path = "z:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Console.WriteLine(line)
Loop
End Using
3
1 3 5
2 4 6
7 8 9
vb.net matrix text-files
add a comment |
Reads a matrix from a text file, the first line of the text file has the dimensions of the matrix, the next lines will contain the elements by rows separated by spaces. I was thinking about using this but don't know how to do the get from text file.
Dim path = "z:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Console.WriteLine(line)
Loop
End Using
3
1 3 5
2 4 6
7 8 9
vb.net matrix text-files
Do you have more than one matrix in that text file? If you have, the code required is slightly more complex, if you haven't, the first value is useless. So, are the matrix values always separated by a line feed (or is it more than one line feed, as it looks like, given the sample you posted?), or could they be presented in a single line (which would make the first value - the dimension - meaningful)?
– Jimi
Mar 24 at 12:44
add a comment |
Reads a matrix from a text file, the first line of the text file has the dimensions of the matrix, the next lines will contain the elements by rows separated by spaces. I was thinking about using this but don't know how to do the get from text file.
Dim path = "z:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Console.WriteLine(line)
Loop
End Using
3
1 3 5
2 4 6
7 8 9
vb.net matrix text-files
Reads a matrix from a text file, the first line of the text file has the dimensions of the matrix, the next lines will contain the elements by rows separated by spaces. I was thinking about using this but don't know how to do the get from text file.
Dim path = "z:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Console.WriteLine(line)
Loop
End Using
3
1 3 5
2 4 6
7 8 9
vb.net matrix text-files
vb.net matrix text-files
edited Mar 24 at 12:25
loco3424
asked Mar 24 at 10:47
loco3424loco3424
104
104
Do you have more than one matrix in that text file? If you have, the code required is slightly more complex, if you haven't, the first value is useless. So, are the matrix values always separated by a line feed (or is it more than one line feed, as it looks like, given the sample you posted?), or could they be presented in a single line (which would make the first value - the dimension - meaningful)?
– Jimi
Mar 24 at 12:44
add a comment |
Do you have more than one matrix in that text file? If you have, the code required is slightly more complex, if you haven't, the first value is useless. So, are the matrix values always separated by a line feed (or is it more than one line feed, as it looks like, given the sample you posted?), or could they be presented in a single line (which would make the first value - the dimension - meaningful)?
– Jimi
Mar 24 at 12:44
Do you have more than one matrix in that text file? If you have, the code required is slightly more complex, if you haven't, the first value is useless. So, are the matrix values always separated by a line feed (or is it more than one line feed, as it looks like, given the sample you posted?), or could they be presented in a single line (which would make the first value - the dimension - meaningful)?
– Jimi
Mar 24 at 12:44
Do you have more than one matrix in that text file? If you have, the code required is slightly more complex, if you haven't, the first value is useless. So, are the matrix values always separated by a line feed (or is it more than one line feed, as it looks like, given the sample you posted?), or could they be presented in a single line (which would make the first value - the dimension - meaningful)?
– Jimi
Mar 24 at 12:44
add a comment |
1 Answer
1
active
oldest
votes
Dim path = "D:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
A.Dump() ' print the matrix in LinqPad
End Using
Text file sample:
3
1 3 5
2 4 6
7 8 9
Result in LinqPad.
Modified code without LinqPad:
Dim path = "d:matrix.txt"
Dim A(,) As Integer
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Redim A(size - 1, size - 1)
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
End Using
Console.WriteLine("Matrix A :")
Dim numberWidth As Integer = 2
Dim format As String = "D" & numberWidth
For i As Integer = 0 To A.GetUpperBound(0)
Console.Write("| ")
For j As Integer = 0 To A.GetUpperBound(1)
Console.Write("0 ", A(i, j).ToString(format))
Next
Console.WriteLine("|")
Next
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
1
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
|
show 7 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323002%2fmatrix-from-a-text-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Dim path = "D:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
A.Dump() ' print the matrix in LinqPad
End Using
Text file sample:
3
1 3 5
2 4 6
7 8 9
Result in LinqPad.
Modified code without LinqPad:
Dim path = "d:matrix.txt"
Dim A(,) As Integer
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Redim A(size - 1, size - 1)
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
End Using
Console.WriteLine("Matrix A :")
Dim numberWidth As Integer = 2
Dim format As String = "D" & numberWidth
For i As Integer = 0 To A.GetUpperBound(0)
Console.Write("| ")
For j As Integer = 0 To A.GetUpperBound(1)
Console.Write("0 ", A(i, j).ToString(format))
Next
Console.WriteLine("|")
Next
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
1
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
|
show 7 more comments
Dim path = "D:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
A.Dump() ' print the matrix in LinqPad
End Using
Text file sample:
3
1 3 5
2 4 6
7 8 9
Result in LinqPad.
Modified code without LinqPad:
Dim path = "d:matrix.txt"
Dim A(,) As Integer
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Redim A(size - 1, size - 1)
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
End Using
Console.WriteLine("Matrix A :")
Dim numberWidth As Integer = 2
Dim format As String = "D" & numberWidth
For i As Integer = 0 To A.GetUpperBound(0)
Console.Write("| ")
For j As Integer = 0 To A.GetUpperBound(1)
Console.Write("0 ", A(i, j).ToString(format))
Next
Console.WriteLine("|")
Next
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
1
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
|
show 7 more comments
Dim path = "D:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
A.Dump() ' print the matrix in LinqPad
End Using
Text file sample:
3
1 3 5
2 4 6
7 8 9
Result in LinqPad.
Modified code without LinqPad:
Dim path = "d:matrix.txt"
Dim A(,) As Integer
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Redim A(size - 1, size - 1)
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
End Using
Console.WriteLine("Matrix A :")
Dim numberWidth As Integer = 2
Dim format As String = "D" & numberWidth
For i As Integer = 0 To A.GetUpperBound(0)
Console.Write("| ")
For j As Integer = 0 To A.GetUpperBound(1)
Console.Write("0 ", A(i, j).ToString(format))
Next
Console.WriteLine("|")
Next
Dim path = "D:matrix.txt"
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Dim A(size - 1, size - 1) As Integer
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
A.Dump() ' print the matrix in LinqPad
End Using
Text file sample:
3
1 3 5
2 4 6
7 8 9
Result in LinqPad.
Modified code without LinqPad:
Dim path = "d:matrix.txt"
Dim A(,) As Integer
Using reader As New IO.StreamReader(path)
Dim size = reader.ReadLine() ' read first line which is the size of the matrix (assume the matrix is a square)
Redim A(size - 1, size - 1)
Dim j = 0 ' the current line in the matrix
Dim line As String = reader.ReadLine() ' read next line
Do While (line <> Nothing) ' loop as long as line is not empty
Dim numbers = line.Split(" ") ' split the numbers in that line
For i = 0 To numbers.Length - 1
A(j, i) = numbers(i) ' copy the numbers into the matrix in current line
Next
j += 1 ' increment the current line
line = reader.ReadLine() ' read next line
Loop
End Using
Console.WriteLine("Matrix A :")
Dim numberWidth As Integer = 2
Dim format As String = "D" & numberWidth
For i As Integer = 0 To A.GetUpperBound(0)
Console.Write("| ")
For j As Integer = 0 To A.GetUpperBound(1)
Console.Write("0 ", A(i, j).ToString(format))
Next
Console.WriteLine("|")
Next
edited Mar 24 at 12:38
answered Mar 24 at 12:01
HanHan
2,34821525
2,34821525
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
1
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
|
show 7 more comments
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
1
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Hello, i am new to this, is possible if you could write in code for VB, don't know what linqpad is sorry
– loco3424
Mar 24 at 12:08
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
Just copy the code and paste it in a console app. Remove the A.Dump() line. Use loop to print the numbers into the console. Don't forget to create a text file and modify the path variable.
– Han
Mar 24 at 12:10
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
I done it but not getting the first line, posed the code, please let me know
– loco3424
Mar 24 at 12:24
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
Post your text file and the code you wrote based on mine.
– Han
Mar 24 at 12:27
1
1
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
I've never used LinqPad, looks pretty cool!
– Idle_Mind
Mar 24 at 15:11
|
show 7 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323002%2fmatrix-from-a-text-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you have more than one matrix in that text file? If you have, the code required is slightly more complex, if you haven't, the first value is useless. So, are the matrix values always separated by a line feed (or is it more than one line feed, as it looks like, given the sample you posted?), or could they be presented in a single line (which would make the first value - the dimension - meaningful)?
– Jimi
Mar 24 at 12:44