167 Topics

Member Avatar for
Member Avatar for souad

I have this code that outputs the tfidf for all words in each file in the directory. I'm trying to transfer this to a matrix where each row correspond to each file in the directory and each column to all words in the files and I have some difficulty in …

0
200
Member Avatar for ivan3510

Hi! I have this code, classes with matrices, overloading operator etc (this is just one part, I reduced it from original). #include<iostream> using namespace std; class matrix { protected: float* M; size_t m,n; public: matrix(){} matrix(size_t m,size_t n); matrix(const matrix& A); ~matrix(); matrix& operator=(const matrix& A); matrix operator+(const matrix& A) …

Member Avatar for mike_2000_17
0
328
Member Avatar for BogdanCov

Hello guys. I have queries, i made a matrix of Buttons and another of Panels and everythings is ok, that works. There is the code: private void button1_Click(object sender, EventArgs e) { for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) …

Member Avatar for BogdanCov
0
189
Member Avatar for Xheis

Hi, I have to create a program that creates N child processes, and they muliply the matrix. I have some base codes but when I try to run them they give me segmentation error and I cant find the problem. #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <sys/types.h> …

Member Avatar for David W
0
308
Member Avatar for london-G

Hello, I am getting the error: "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:15" There is definetly something I am doing wrong but I cannot figure out what. Any help will be appreciated. The error in the output is poiinting to line 119; if(R[currentState][action] > -1){. I tried to change this but no …

Member Avatar for london-G
0
639
Member Avatar for printf.me
Member Avatar for Minimalist
0
131
Member Avatar for printf.me

create a code that will read a file for an input which is a matrix,(rows and columns of the integers) and be able to output the transpose of it. original matrix 3X4 transpose matrix 4X3 1 2 3 4 1 5 9 5 6 7 8 2 6 0 9 …

Member Avatar for David W
0
97
Member Avatar for Rahul47

Hello folks, This nitty problem is haunting me today. Here is the code I have written, but am not getting the expected output. This is a program for printing matrix in spiral order. #include<stdio.h> #include<stdlib.h> int main() { int rows,cols,i,j; int tr=0,rc,br,lc=0; /* tr = top row index. rc = …

Member Avatar for Rahul47
0
298
Member Avatar for anku83

How can we detect redundant rows.and maintain their count. if the rows are like 11111 11111 10101 11111 the result i want is 11111 4 10101 1

Member Avatar for gon1387
0
247
Member Avatar for James19142

How do the numbers in a matrix relate to coordinates in 3D space. I've looked at a ton of tutorials for an answer but I still haven't come to an answer. They explain mainly the math which I try to use to answer my question, but I can't come to …

Member Avatar for James19142
0
272
Member Avatar for duskoKoscica

Well I have created this one and on my computer it is working. I would like to hear about some alternative solutions. INTRODUCTION This time I have one algorithm, but to understand it we need to consider a few terms. First of all, we should be familiar with the pangrams. …

Member Avatar for duskoKoscica
0
353
Member Avatar for electrodelic

**hello peeps and geeks, i am missing the MinSpanningTree function here.. any help please? need to fill up the function to get a) Minimum spanning tree cost for the graph b)Spanning tree path for the graph. E.g in matrix or adjancency list. ** #include <iostream> #include <ctime> // For time() …

Member Avatar for Mouche
0
310
Member Avatar for manel1989

hi all i use gecode solver to solve my model ; but i get this error Access Violation when reading of the location 0x0000001c and i don't konw how to fix it here is my code : #include <gecode/driver.hh> #include <gecode/int.hh> #include <gecode/minimodel.hh> #include <iostream> #include <vector> using namespace Gecode; …

Member Avatar for Ancient Dragon
0
600
Member Avatar for booicu

I saw this segment and I wasn't sure if I was excited or scared... but my feelings were urging more towards fear. I just do not know if it's a good idea to start microchipping people for better intelligence. Especially our children. Are we slowly turning ourselves in robots? As …

Member Avatar for G_Waddell
0
461
Member Avatar for manel1989

Hi everyone I'd like to know how I can fill a matrix [n] [m] from a vector of size n * m Thank you very much every one

Member Avatar for jackmaverick1
0
251
Member Avatar for miladshayan

I am a beginner I am using with CORSIKA software. cosika's outputs are text files with 8 or 7 column and more than 2000 row(like matrix) . Arrays of this matrix are number in Scientific notation like fallowing image ![340c241a97cdc541d3f4b8c57ada068d](/attachments/large/4/340c241a97cdc541d3f4b8c57ada068d.jpg "340c241a97cdc541d3f4b8c57ada068d") I want to read data in 7th column and …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for abhimanipal

Hi Guys, I am trying to teach myself templates in C++. My current assignment is to create a matrix class by using vector of vectors. I have got most of it done but my code is crashing when I try to overload the random access operator in my matrix class. …

Member Avatar for deceptikon
0
443
Member Avatar for RounaqJJW

float det(float A[][10],int m) { float B[10][10],d=0; int i,a,b,x,y; if(m==2) return (A[0][0]*A[1][1])-(A[1][0]*A[0][1]); else { x=0;y=0; for(i=0;i<m;i++) { for(a=0;a<m;a++) { if(a==i) continue; else { for(b=1;b<m;b++) { B[x][x]=A[a][b]; x++; } } } if(i%2) d-=det(B,x); else d+=det(B,x); } } return d; } I tried to run the program, but it exits with error …

Member Avatar for ddanbe
0
188
Member Avatar for cussel

hi all, how to do multiplication matrix with iteration and stop iteration if value >= 5? $data = array( array(1,-0.52836), array(-0.52836,1,), ); for ($i=0;$i<count($data);$i++) { for ($j=0;$j<count($data[$i]);$j++) { $R2[$i][$j] = (($data[$i][0]*$data[0][$j])+($data[$i][1]*$data[1][$j])); } } echo "<pre>"; print_r($R2); echo "</pre>"; result: 1.279164732 -1.056721269 -1.056721269 1.318545629 how to do nested loop from process …

Member Avatar for LastMitch
0
227
Member Avatar for SoreComet

Hey Guys, I need your expertise. Please help me. In the following program, 2 matrices and given values and then displayed. The program works fine but I really can't understand how it works. #include <stdio.h> #include <stdlib.h> void getmat(int a[50][50],int n) { int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); } void printmat(int …

Member Avatar for deceptikon
0
165
Member Avatar for DavidB

Here is a small--complete--program that includes a sub-routine that inputs two matrices and then multiplies them. Notes: * 1) I happen to like taking input from a text file. It eliminates the need to type input from the console, especially when debugging, it prevents the possibility of making typos. * …

Member Avatar for Shellback3
3
2K
Member Avatar for islam.fci.3

I want to write a class that do operation on two matrices by 2D vector but i have some problems with the 2D vector , any one can help me?

Member Avatar for tinstaafl
0
268
Member Avatar for iraklakis

Don't know why my code crashes when j=317. I thought was the matrix dimensions, so tried some numbers. Nothing particular happened. Every help would be very usefull. #include <stdio.h> #include <math.h> int main(){ int T,i,j,t,c,r[T],Jmax,Z,k; float v[10],R[10],EBNo[10],trapserv[10],a[10],w[10],Pblock[10]; float L[j+1][j],B[T+1][j+1],b[T+1][1000],P[T+1][j+1],q[j+1],qnorm[j+1]; float sigma,mtimi,mtimic,CV; float Nmax,g,W,EIother,C,Nown,No,totofcell,sumq; float Gamma,bita,QA,LA,BA; float x; //Data input// ` …

Member Avatar for iraklakis
0
230
Member Avatar for 9tontruck

Hi.. d1 = a1*x1 + b1*x2 + c1*x3 d2 = a2*x1 + b2*x2 + c2*x3 d3 = a3*x1 + b3*x2 + c3*x3 Knowing all of a,b,c,d, I have to find x1, x2, x3. As you might noticed, this is high school math. But, how do I write the code to …

Member Avatar for DavidB
0
411
Member Avatar for chriswelborn

I didn't write this, the credits are in the code. It's a code-golf version, and I'm sorry about that. I am trying to 'decode' it but I don't have the skills, so the 'decoded' version doesn't have the right colors. This is an example of what you can do with …

0
1K
Member Avatar for elattar

I need to make program that calculate multiplication of matrice i made it in main now i need to make it in functions would anybody hepl me with my problem that is my code #include <iostream> using namespace std; #include <cstdlib> void fn(int **arr) { } void fn2 (int **arr2){ …

Member Avatar for elattar
0
170
Member Avatar for vegaseat

This code example shows how to create a dictionary with row,column indexed (r,c) key tuples from a typical list of lists 2D matrix. Also an example is shown of the ease of processing the resulting dictionary.

Member Avatar for TrustyTony
5
6K
Member Avatar for Bchandaria

Can any one help me out to provide code for a following matrix for N numbers? 12345 21234 32123 43212 54321 Please Help me out for this matrix

Member Avatar for Moschops
0
109
Member Avatar for SeanBlack0000

I am trying to create a graph from a 2d matrix of booleans. When the index [i][j] == 1, I need to create a link or edge from node[i] to node[j]. I am doing some thing wrong. I have created a class file with a struct node and some basic …

0
204
Member Avatar for anurag2013

Please visit http://www.cuteework.com/members.php Login button not work. here is members.php file details. <?php session_start(); session_register("id_session"); session_register("password_session"); include "header.php"; include "config.php"; $a=""; $b=""; if ($_POST) { $a=trim($_POST["id"]); $b=trim($_POST["password"]); $a=str_replace("'","",$a); $b=str_replace("'","",$b); $a=str_replace("\"","",$a); $b=str_replace("\"","",$b); } if ($a=="" || $b=="") { if ($_SESSION["id_session"]=="" || $_SESSION["password_session"]=="") { ?> <form action=members.php method=post> <br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login …

Member Avatar for anurag2013
0
249

The End.