No matter how I write this script, Powershel will not write my array as it should, it prints a single line array.
PS C:\Windows\system32> $matriz = @(
(1,2,3,4),
(5,6,7,8)
)
Write-Host $matriz
1 2 3 4 5 6 7 8
Neither this way:
PS C:\Windows\system32> $matriz = ,@((1,2,3,4),
(5,6,7,8))
Write-Host $matriz
1 2 3 4 5 6 7 8
How do I print this as a real 2-dimension matrix?
And... I'm trying to populate this same array with Get-Random, but it shows the following error: Failed add the number where you want (i.e. matriz [0,1]) because it doesn't support fractions <- Not the real message but you guys won't understand portuguese :/
*Update:
I want it to be printed as this:
1 2 3 4
5 6 7 8
'Cause the single line thing won't help me to see if my matrix is correct, as a single line I will never know what is in the array's diagonal line.