All Questions
58
questions
0
votes
1
answer
24
views
Why is my FOV Perspective Matrix4x4 looking Orthographic (DotNet and SkiaSharp)?
Brief overview, you can image I'm drawing points of a 3D schematic onto a Canvas, think CAD.
I have points in 3D XYZ Vector3 coordinates, and I've got a model, view, projection matrix all setup. I've ...
0
votes
1
answer
71
views
Add two matrices
I have a problem "Index was outside the bounds of the array." and can't understand where is a problem
static void Main(string[] args)
{
Console.WriteLine("If you want add elemenets of ...
0
votes
1
answer
111
views
How to optimize my code and what's the VB.NET equivalent of C# indexers?
struct Matrix {
readonly int Rows, Columns;
int[,] _Matrix;
public Matrix(int Rows, int Columns) {
this.Rows = Rows;
this.Columns = Columns;
_Matrix = new int[Rows, Columns]
}
...
1
vote
1
answer
154
views
Finding out Horizontal/Vertically aligned markers in a matrix
How do I go about solving the tic-tac-toe problem in C#.
The rule of the game is , in a 3*3 square board players take turns alternatively.
A player wins when he has 3 markers aligned horizontally or ...
0
votes
1
answer
377
views
HERE Matrix Routing - Mapping results to original objects, C#
I am using the HERE Matrix Routing API to get distance and duration between locations by supplying desired transport mode.
The API takes an array of origins and an array of destinations, perfect for ...
0
votes
1
answer
310
views
Accessing rows/columns/diagonals of a 2d matrix C#
I'd like to access the rows, cols and the diagonals of a 2d matrix. How can I do this correctly?
I'm planning to use this in a function where I will access a particular row, column or diagonal and ...
-1
votes
1
answer
128
views
C# [i, j] add the min "j" values of matrix to the new array?
[i, j] add the biggest values of matrix to j the new array
its here:
But smallest not working..
Min values in "j" (not working)
for (int i = 0; i < olay; i++)
{
for (int j = 0; j ...
0
votes
0
answers
572
views
Emgu CV undistort image gives blank result sometimes
Im undistorting an image using intrinsic values of camera martix and distortion coeeficient. It corrects the distortion perfectly. But if I load same image twice, sometimes it gives out a blank gray ...
1
vote
3
answers
587
views
how to count nonzero elements in a matrix?
I have a matrix with two values (0,1), I have to count the number of "1" in this matrix, so I tried to check all elements but for [1000,1000] matrix, it takes too long, and another problem is, I ...
0
votes
0
answers
67
views
How to calculate Matrix exponent in Math.net?
In Python:
Fnk = np.array([[15.11, 16.11, 17.11, 18.11], [15.11, 16.11, 17.11, 18.11],
[15.11, 16.11, 17.11, 18.11], [15.11, 16.11, 17.11, 18.11]])
CellPatAm = np.power(10, Fnk / 20)
...
1
vote
2
answers
807
views
Filling an array with true and false booleans randomly in c# (and other questions)
Currently studying on University, learning programming and I got a homework which i can't really solve.
My task is to create Conway's Game of Life where you make an array which you have to fill with "...
1
vote
2
answers
504
views
2D Array - counting number sequence
I am somehow completely on the hose. It is to be understood by the functional principle and does not sound particularly difficult? But i can not really come up with a possible solution.
I have a 2D ...
0
votes
3
answers
2k
views
Spiral matrix with entered rows and columns
As an assignment i have to create a spiral matrix where the user inputs the number of rows and number of columns.
This is my code for far (first year in college studies, so don't be too hard on me)
...
1
vote
1
answer
65
views
Storing Multiple .NET Arrays (Matlab)
How can I store .NET arrays in a matrix without converting them to another data type?
If I have
A = NET.createArray('System.Int16', n);
B = NET.createArray('System.Int16', n);
How to do I store ...
2
votes
3
answers
1k
views
Dot product function
I write a dot product function that takes 2 lists:
let inline dot a b =
List.zip a b
|> List.map (fun (a, b) -> a * b)
|> List.reduce (+)
Is there a better way to calculate dot ...