-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am stuck on this problem in my homework. I've made it this far and am sure the problem is in my three for loops. The question directly says to use 3 for loops so I know this is probably just a logic error.
#include<stdio.h>
void matMult(int A[][5],int B[][5],int C[][5]);
int printMat_5x5(int…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
My matrix multiplication code is
int matMul(int ld, double** matrix)
{
//local variables initialize
omp_set_num_threads(nthreads);
#pragma omp parallel private(tid,diag,ld) shared(i,j,k,matrix)
{
/* Obtain and print thread id */
tid = omp_get_thread_num();
for ( k=0; k<ld; k++) …
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have both matrices containing only ones and each array has 500 rows and columns. So, the resulting matrix should be a matrix of all elements having value 500. But, I am getting res_mat[0][0]=5000. Even other elements are also 5000. Why?
#include<stdio.h>
#include<pthread.h>
#include<unistd…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I've been pulling my hair out trying to get some matrix calculations working properly and started to wonder. If I have the following:
glPushMatrix();
float m[16];
glGetFloatv(GL_MODELVIEW_MATRIX, m);
glPopMatrix();
What should I expect the values of m to equal?
Currently I'm getting these…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have as small c# project that involves matrices. I am processing large amounts of data by splitting it into n-length chunks, treating the chucks as vectors, and multiplying by a Vandermonde** matrix. The problem is, depending on the conditions, the size of the chucks and corresponding Vandermonde**…
>>> More