167 Topics

Member Avatar for
Member Avatar for ninikobb

Hello everybody! Im a new to this site. I wonder how can I get the row dimension of a matrix. For example i have a matrix double[n,m] and i want to get n provided m is unknown. So what property of method should i use??? Thank you

Member Avatar for ddanbe
0
117
Member Avatar for Castiel1631

I am trying to create an abstract data type for matrices. I have a function matrixInit to dynamically allocate memory for the structure and for the array. matrixCopy copies one matrix into another. there are functions to subtract, add and multiply matrices that return a pointer to memory where the …

Member Avatar for Thaylo
0
1K
Member Avatar for halil.burak

Frame complete game, only the outer edges of a square drawn on the table is a game played with 2 players. Sequence of a square drawn from the player wants to draw a non-edge. Underline that this edge of the square is not the last edge of the square is …

0
118
Member Avatar for Hawkeye Python

Hello :) I'm from Brazil, so sorry about my english. This is the first code I post here - I'm a begginer in Python. It is a function to calculate determinants of matrices. You can attach it to a class if you wish. Please leave a comment if you wish …

Member Avatar for Gribouillis
0
3K
Member Avatar for tKc

Hokay so, i gotta make a program that reads an adjacency matrix from a data file and then outputs which nodes are adjacent to the others. In the data file there are 0's and 1's, 0 means that they are not connected and a 1 means that they are. I …

Member Avatar for mrnutty
0
472
Member Avatar for bookmark

Hi, I'm trying to get this program to read a file which contains a matrix. I am trying to output a text file which has the matrix of the input file but with the average of each row. Every time I enter the name of the inputFile and the outputFile …

Member Avatar for Fbody
0
206
Member Avatar for sallubhai

Hi, How can I print this figure if I have an array like this? It should be a for-loop but don´t know how. [CODE] labyrinth = \ [[0,0,0,0,0,0,1,0], [0,1,0,1,1,1,1,0], [0,1,1,1,0,1,0,0], [0,1,0,0,0,0,0,0], [0,1,1,0,1,1,1,0], [0,0,1,1,1,0,0,0], [0,1,1,0,1,1,1,0], [0,1,0,0,0,0,0,0]] [/CODE] figure: ############. ## ## ##. . . . ## ##. . . ## #### …

Member Avatar for TrustyTony
0
139
Member Avatar for RobBobSmith

Hello all, I'm having trouble with making a 2d vector array class. Would anyone have time to help with a couple of questions? I think my problem is with overloading (). I notice that this: [CODE]template <typename T> T& Array2d<T>::operator() ( int x, int y) { if( x >= rows …

Member Avatar for RobBobSmith
0
186
Member Avatar for Caeon

This is what my program is supposed to do: [LIST=1] [*]Print the vector (m1) [*]Print the matrix (m2) [*]Multiply the vector and matrix together and display results [/LIST] The only thing wrong with my program is that I can't quite get the right results displayed. The correct display of values …

Member Avatar for Caeon
0
12K
Member Avatar for Goshutu

my program is made to enter a matix,in which it finds all of the column`s minimum numbers which are[COLOR="Red"] >0[/COLOR] and then put them under the last row.i have sucseded entering the array and puting it out,but i think my IF is wrong somehow.I have tried initialising the last row …

Member Avatar for Goshutu
0
188
Member Avatar for kirennian

I'm currently having an issue with moving the camera around the z-axis (roll). For debugging purposes, I have an object with which I've tested with all 3-axis rotation and movement and it's working as expected; the object in question as well as the camera class superseed a positions class for …

Member Avatar for dineshguru
0
989
Member Avatar for matkod

hi, I'm creating a game with pygame and i want to create a matrix that will represent the map(where each tile will be). my pygame code is ok, because if i create the map without loading the tilemap (the matrix file) the game runs ok. that would be good but …

Member Avatar for Gribouillis
0
181
Member Avatar for thm

I'm trying to write a matrix multiplication program that takes in an int N on command line, creates two NxN matrices A & B, randomly populates them with ints, and then computes the result of multiplying A and B. I wanted to avoid malloc, but the first version started segfaulting …

Member Avatar for thm
0
207
Member Avatar for bflack

Given the matrix representing a relation on a finite set, determine whether the relation is reflexive or irreflexive.. Need your help!

Member Avatar for bflack
0
476
Member Avatar for bflack

Cn somebody give a matrix program which recognizes if it's REFLEXIVE or IRREFLEXIVE?

0
78
Member Avatar for applepomme

for (i=0, i<imax, i++) { // ... Array< complex<float>, 3 > matrix(x,y,z); // x,y,z are large and vary in each loop // ... // matrix <=== values for each element assigned // ... // now want to write "matrix" in a single binary file. // later, this matrix can be …

Member Avatar for chiwawa10
0
185
Member Avatar for applepomme

I used this to write the matrix into a file: int Nx, Ny, Nz; Array <complex<float>, 3> matrix(Nx, Ny, Nz, ColumnMajorArray<3>()); ...get matrix data... fstream outbin(outname.c_str(),ios::out|ios::binary); outbin.write(reinterpret_cast<char *>(matrix.data()),sizeof(complex<float>)*Nx*Ny*Nz); outbin.close(); Then, I used this to read this matrix, works fine, values and orders are correct too: Array <complex<float>, 3> matrixb(Nx, Ny, …

0
80
Member Avatar for marvin42

I am using [URL="http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix.aspx"]matrix class[/URL] to perform image transformations.Problem is that I want to do a perspective transform, which requires a 3x3 matrix. [COLOR="Green"]system.drawing.drawing2d.matrix[/COLOR] behaves like a 3x2 matrix. Here's a short code extract of what I use the matrix for: [CODE] Graphics my_graphics= Graphics.FromImage(my_image); my_graphics.Transform = my_matrix; my_graphics.DrawImage(my_image2, new …

Member Avatar for Momerath
0
182
Member Avatar for guru_iyer

I'm trying to do addition of matrices using pointers. But, in 3x3 matrix, only the first row of the matrix gets added, while the rest are zero. Please help me correct this. Thank You! My code is as follows :: [CODE] #include<stdio.h> #include<conio.h> int a[10][10],b[10][10],c[10][10]={0}; int i=0,j=0,k=0; int r1,c1,r2,c2; void …

Member Avatar for Adak
0
3K
Member Avatar for pc0019

Hi! I am using the Boost uBlas interface for matrices and I'd like to be able to create matrices with the following syntax (or similar): [CODE] typedef boost::numeric::ublas::matrix<double> Matrix; //for clarity Matrix mat = {[1,1,1],[2,2,2],[3,3,3]}; [/CODE] The actual matrix should be 3x3 and look like the following - 1,1,1 2,2,2 …

Member Avatar for vijayan121
0
112
Member Avatar for suguna07

Hi everyone, Can someone help me to solve this question? im attaching the question as i cant post the matrix here. Thank you

Member Avatar for Xufyan
0
65
Member Avatar for RHodgett

[CODE] for (int i = 1; i <= numberofmatricesrequired; i++) { string number = Convert.ToString(i); Matrix (matrixnumber+number) = new Matrix(matrixsize, matrixsize); } [/CODE] Basically I have x amount of matrices I need to establish of y by y size. I was hoping to name the matrices: matrixnumber[B]1[/B] matrixnumber[B]2[/B]..matrixnumber[B]n[/B] I cannot …

Member Avatar for PierlucSS
0
93
Member Avatar for miac09

Hi, I have the following files and can match but, am having trouble with getting the output to write correctly to a data matrix format that I need and would appreciate any help with getting the code right. File 1 has a list of numbers and Files 2, 3 and …

Member Avatar for woooee
0
180
Member Avatar for Ja14

This is as much of a question about algorithm as it is about code. I’m training monkeys to input data into a keyboard in the form of a table. I have created a special keyboard with nothing on it but numbers 0 - 9, a period, tab key and a …

Member Avatar for Ja14
0
121
Member Avatar for jman212

I have this 2d array that sorts the rows but i can't sort the column.. i can't figure it out for the life of me. PLEASE HELP Please enter size of row between 1 - 20: 5 Please enter size of column between 1 - 20: 5 Your matrix is …

Member Avatar for sneaker
0
139
Member Avatar for Annettest

Hi everyone: I have written C++ code for populating a matrix/2D array with calculation results. Each column of the array represents results for a distinct time step. My problem arises because the rows of my results vector do NOT correspond to the rows of the matrix. The matrix includes extra …

Member Avatar for Annettest
0
97
Member Avatar for sana zafar

Hey, Im trying to write a program that using gauss-jordan elimination to solve a set of linear equations.It reads in two files names for matrix A and C. I have to first form an augmentes matrix (A|C) and then do the elimination.Can any one help me by telling how to …

Member Avatar for mrnutty
0
116
Member Avatar for tcstom

Hi, I am attempting to create a dynamic array using realloc in 2 dimensions. Currently i have managed to get it to work using realloc to dynamically resize the amount of rows but when I attempt to use realloc to dynamically resize the amount of columns per row I keep …

Member Avatar for tcstom
0
4K
Member Avatar for callie

Hey. I need a method that creates a matrix from an array, for instance: ({10, 11, 12, 13}, 2) should return {{10, 11, 12}, {13}}. [code]public class Matrix{ public static int[][]toM(int[] array, int a){ int[][]matrix = new int [(array.length)/a][a]; for (int i = 0; i < array.length; i++){ int value …

0
65
Member Avatar for jonyshub

Hi everybody! Sorry for my bad english! I have a matrix of integers with a maximum length 6 digits. I must to write program, that checks whether a number is found in the section above the main secondary diagonal of this matrix. I'm beginner in C + + and I …

Member Avatar for farag
0
142

The End.