167 Topics

Member Avatar for
Member Avatar for matrixcool

Hello, I have a file and this how it looks like: 6 {a, b, c, d, e, f} 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 1 1 …

Member Avatar for matrixcool
0
244
Member Avatar for kikiritce

Matrix given in memory to print the spiral in opposite direction from clockwise (left column down the right lower range, right up column, a series of upper left, etc. until you get to the middle) This is matrix 1 2 3 8 9 4 7 6 5 and the result …

Member Avatar for kikiritce
0
159
Member Avatar for dolfan55aj

I have a Graph that I'm making using an adjacency matrix to hold edge values. The noEdge value is zero and all edgeweights are positive integers. I have to delete a node from this graph and I'm having trouble figuring out how to update the Adjacency matrix after the deletion …

Member Avatar for mrnutty
0
951
Member Avatar for kgal

Hello, I want to use Hamming Code to correct any BER's that I have streaming from a text file. The contents of my text file are as follows: 0 0 1 0 1 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 …

Member Avatar for Adak
0
164
Member Avatar for begueradj

Hello people I have a 2 dimension array that contains only 0 and 1 values. I want to represent all the 0 elements in a tree: how can I do that ? Thank you for any help

Member Avatar for begueradj
0
92
Member Avatar for kikiritce

Write a program which for a square matrix to calculate the sum of the elements. Assume that the amount can be placed in 16-bit register Example: 1 [COLOR="Red"]1 1[/COLOR] 2 2 [COLOR="Red"]2[/COLOR] 3 3 3 Elements are: 1,1, 2, which are with red color. I had calculate sum of this …

Member Avatar for skaa
0
170
Member Avatar for Knar

Ey all. Im folowing a c++ course and im stuck writing string or char arrays to matrices. The problem is i have a matrix of size [i][j] with random values from 0 to 3. Each of these values have to correspond to either a string or char array. 0=EMPTY 1=RES …

Member Avatar for Greywolf333
0
415
Member Avatar for DmytriE

Hi everyone! In class we just learned about pointers and the their uses. We have been given a project where we need to allocate dynamic memory for any number of matrices (up to four). All four of the matrices addresses are stored in a matrix poiner. All of this must …

0
75
Member Avatar for alliswim2010

[COLOR="gray"][/COLOR]1. your-netid_hw5_1.java : Liang page 253, programming exercise 7.6. (Multiplying two matrices) Write a method to multiply two matrices. The header of the method is as follows: public static double[][] multiplyMatrix(double[][] a, double[][] b) To multiply matrix a by matrix b, the number of columns in a must be the …

Member Avatar for ~s.o.s~
0
720
Member Avatar for bearlow

I'm trying to store these arrays into the matrix [CODE]double X[5][3][/CODE] so I could classify them with 1 Nearest Neighbour: [CODE=C]double brick_v[3]={ent_brick,en_brick,con_brick}; double metal_v[3]={ent_metal,en_metal,con_metal}; double skin_v[3]={ent_skin,en_skin,con_skin}; double wood_v[3]={ent_wood,en_wood,con_wood}; double grass_v[3]={ent_grass,en_grass,con_grass};[/CODE] I would be very grateful if someone would show me how you can do this in C++.

Member Avatar for Fbody
0
205
Member Avatar for suraj_p

When i run this program it takes more values and prints less values.... this runs on Dev C++([url]www.bloodshed.net[/url]) [CODE]#include<iostream> using namespace std; #include<conio.h> int main() { int arr[5][5],i,j,k,l; cout<<"Enter matrix row wise"; for(i=0;i<=3;i++) { for(j=0;j<3;j++) { cin>>arr[i][j]; } } for(k=0;k<3;k++) { for(l=0;l<3;l++) { cout<<" "<<arr[k][l]; } printf("\n"); } getch(); } …

Member Avatar for suraj_p
0
175
Member Avatar for KKR_WE_RULE

I've made a library for Delphi to work with matrices. Everything in the library works perfectly as intended save the Matrix Inversion Procedure. I've used the Gauss-Jordan method of Matrix Inversion & everything works excellent for square matrices upto 7x7. From 8x8 onwards, I get a 'Invalid Floating Point' Error …

Member Avatar for Mikav6
0
496
Member Avatar for Petan Kl

Hello, I am wondering if there is an efficient way (other than for cycle) of solving following task: I need to multiply e.g. two matrices and at every point in the matrix there is an array. The two matrices shall be multiplied using matrix multiplication and when the elements of …

Member Avatar for Gribouillis
0
211
Member Avatar for somon

hi everyoen i've a matrix array with some value, i want to shaw each of them in matrix type in my form, how can i do it? can i use DataGrid view for this? and if yes ... what is method..

Member Avatar for Ancient Dragon
0
261
Member Avatar for Haranadh

Can some one suggest best way to calculate the huge matrix. Example: [CODE] const int NUMPAT = 1212; const int NUMIN = 6; const int NUMHID1= 13; const int NUMHID2 =15; const int NUMOUT = 12; #define rando() ((double)rand()/(RAND_MAX+1)) [/CODE] Below are----- [CODE] double Input[NUMPAT+1][NUMIN+1]; double Target[NUMPAT+1][NUMOUT+1]; double SumH1[NUMPAT+1][NUMHID1+1], WeightIH1[NUMIN+1][NUMHID1+1], …

Member Avatar for mike_2000_17
0
305
Member Avatar for mashar

Hello all, I am currently a student doing an end-of-year software project - and I need some help. I am currently trying to return a 2D array from a function contained in a header file. The function is called from the main() and asks the user to input the location …

Member Avatar for mashar
0
140
Member Avatar for comSysStudent

Hi all, I have a programming assignment to store sparse matrices using a list<list <myclass> >. I have pretty much everything nailed down but I'm going wrong at some point, the output is incorrect. Instead of giving me 4 lines with the column position and value of non zero values …

Member Avatar for comSysStudent
0
188
Member Avatar for spixy

I have a problem on programming, its not really my assignment, but my friends... i just thought i can resolve this at C, because i got some backgrounds on it.. but i can't do it my compiler is dev c++ the code must be on C++ not C can i …

Member Avatar for spixy
0
2K
Member Avatar for sparkthesunoff

So i have a matrix. (n rows, m cols), and my program has to count the number of rows, where all the cols were >0. For eg. there are n cities, and m bird species. The program has to count the number of cities, where all the bird species (m) …

Member Avatar for jonsca
0
99
Member Avatar for toritza

hello. I am quite new in python so i have a question. I have a csv file in which i have names of 30 cities and their coordinates(lat and long). i want to generate a distance matrix for these cities. How can i do this ?

Member Avatar for Gribouillis
0
2K
Member Avatar for 24x24

Ok, I have three main tasks. One: I need to create a 2 dimensional array that is 8x8 and consists of randomly generated numbers that range from 0-3. I'm assuming the Math.random will be used inside of a for loop with a limit set for length(8) and range(0-3) somehow? Two: …

Member Avatar for 24x24
0
247
Member Avatar for LexLieberthal

My friend needs a program that will: 1. Ask the user for the size of the matrix. The choices are 2x2 or 3x3. 2. Ask the user for the operation to perform. The choices are addition or subtraction. 3. Let the user input the numbers for the first matrix. 4. …

Member Avatar for LexLieberthal
-1
145
Member Avatar for Dasharnb777

Hi, everyone. I need to find matrix n*n (or 5*5) determinant. I have a function translated from Pascal, but there's INDEX OUT OF RANGE EXCEPTION. Could somebody help me? Here's my code: [CODE]public static double DET(double[,] a, int n) { int i, j, k; double det = 0; for (i …

Member Avatar for Dasharnb777
0
680
Member Avatar for Dasharnb777

Hi, I have a matrix. And I need to get 1D arrays from my matrix. For example, I have follow matrix: 123 456 789 So it looks like 3 [B]arrays[/B]: 147, 258, 369. But I got "Index out of range exception" in this code: [CODE] int[] b = new int[n]; …

Member Avatar for Dasharnb777
0
131
Member Avatar for blessed87

I have the following code: [CODE]for (int w=0; w<10; w++) { //some lines of code unsigned long num = x.to_ulong(); cout << "Decimal form is: " << num << endl; } [/CODE] Now what I want is, to make a matrix which will have these values of num, column wise. …

Member Avatar for djarn
0
175
Member Avatar for blessed87

[CODE]std::vector<std::vector<unsigned long> > matrix(15); // 15 rows typedef std::vector<std::vector<unsigned long> >::iterator it_type; it_type row = matrix.begin(); for (int w=0;w<10;w++) { //some lines of code unsigned long num = x.to_ulong(); cout <<"Decimal form is: " << num<< end; // if we've hit 15 items in the current row (i.e. 15 columns), …

Member Avatar for WaltP
0
188
Member Avatar for negneg

Hi Everyone, I am trying to compile a code and I keep getting error C2064: term does not evaluate to a function taking 1 arguments here is my code(actually I got it from a book),can anyone help me what is wrong? thanks Negin #include <iostream> #include <math.h> using namespace std; …

Member Avatar for negneg
0
197
Member Avatar for HeartBalloon

I have to write a code to build an array like this: 1,6 1,0 2,3 3,4 5,6 4,5 7,6 1,2 9,7 Where the numbers are coordinates which have to be "separated" when taken in consideration Like: cell[2][2]---> x=5 y=6 I decided to make a char array, so that with atoi() …

Member Avatar for HeartBalloon
0
107
Member Avatar for stroper

Hye everyone, I am trying to make a 2d-char array, fill it with random letters(chars) and print it. If I do it like this I get a ArrayIndexOutOfBoundsException: 0. I am a newbee. I import my prefs(width, height) from static getters in the class preferences. Can anyone help me please? …

Member Avatar for stroper
0
466
Member Avatar for sandwich88

hi everyone this is my first post and yes, im just starting with cpp im using devc++ so i have this homework which i could get done for its due date but still it would really help me to understand more about cpp if i could get it done but …

Member Avatar for sandwich88
0
132

The End.