Here is my code.How can I print out all the even vectors different from 0? The result is incorrect but I don’t know what is the problem here. #include<iostream> #include<math.h> using namespace std ; int main () { int i,j,N,M; int a[100][100]; cout << "the number of rows of the matrix = " ; cin ..

#### Category : matrix

I try to create an isometric world like diablo, league of legend etc with a view that will be movable in the world. I don’t understand how the rotations should be done and which projection / view to use. I have tried to follow this guide and other resources without success. Here is my code: ..

FreeGLUT provides already some basic transformation functions such as translate, rotate and scale. However, I need particular geometric transformations to apply to objects in a 3-dimensional space. I’m using FreeGLUT and glm as libraries. I’m having fun with some models already provided by FreeGLUT, such as glutSolidTorus() function. Thanks to linear algebra I can compute ..

I need to split an MxN matrix into N parts with an even number of rows in each part. Moreover, the last part will be too much if the matrix is odd. But I don’t know which algorithm I should use. Can’t figure out how to do this. Tell me please For example: we have ..

The thing I want to do is this: MatrixXd M; // Whatever assigned to `X` VectorXd V = M(1); Eigen does not support this. Is there a way to retrieve an Eigen vector from an Eigen matrix? Source: Windows Que..

Hi, Can anyone has a solution for this? Can you show me an example of how to do this? Source: Windows Que..

Develop and run the MPI program on the cluster in C ++, in which the transposed matrix is constructed with using procedures for generating data types. I do not know how to solve this, if there is a master here? Разработайте и выполните на кластере программу MPI на языке C++, в которой транспонированная матрица строится ..

Good afternoon dear all. I have a question that can be quite silly or not. Well, i am gettiing involved with C++, and i have to generate a code on which matrices are involved, the code huge, therefore i decide to work with classes because of the maintainance. Let me tell you that such code ..

This is my code Does any one know how I can format it so it looks more like a square rather due to the different character sizes in each element. 1 int main() { string a[4][4]= {{"xC9","xCD","xCD","xBB"}, {"xBA","p1","p2","xBA"}, {"xBA","100","p3","xBA"}, {"xC8","xCD","xCD","xBC"}}; printSquare(a); this is my code but the output seems to look funny Source: Windows Questions ..

#inlude<iostream> using namespace std; int main(){ int n1,n2,n3; cin>>n1>>n2>>n3; int a1[n1][n2]; for(int i=0;i<n1;i++){ for(int j=0;j<n2;j++){ cin>>a1[i][j]; } } int a2[n2][n3]; for(int i=0;i<n2;i++){ for(int j=0;j<n3;j++){ cin>>a2[i][j]; } } int ans[n1][n3]; for(int i=0;i<n1;i++){ for(int j=0;j<n3;j++){ for(int k=0;k<n2;k++){ ans[i][j]+=a1[i][k]*a2[k][j]; } } } for(int i=0;i<n1;i++){ for(int j=0;j<n3;j++){ cout<<ans[i][j]<<" "; } cout<<endl; } return 0; } // this is the ..

## Recent Comments