291 Topics

Member Avatar for
Member Avatar for Peppercat101

I have a slight problem, I have a dynamicSizeMatrix that has a member [CODE] ListAsLinkedList** theList; [/CODE] Now this ListAsLinkedList can be either DLL or SLL, now it all works fine but when I add elements like this: [CODE] DynamicSizeMatrix hello(ListAsDLL(),5); hello.addToList(0,2,new Integer(10)); hello.addToList(1,4,new Integer(6)); hello.addToList(2,6,new Integer(8)); hello.addToList(3,8,new Integer(7)); hello.addToList(4,10,new …

0
106
Member Avatar for soffie

Need to make a random size (x = rows, y = columns) matrix which is filled with random numbers (only 0 or 1). So, if I don't know the size of the matrix, I use dynamic array. So far I have made this far, but obviously it isn't quite correct... …

Member Avatar for soffie
0
2K
Member Avatar for noi80

Hello. I am currently working on a school project. I need to implement 4x4 matrix multiplication with multi-threads (pthread) doing each multiplication. By studying the assignment description and other codes found online, I was able to get a general idea of what I need to do. However, I am having …

Member Avatar for noi80
0
150
Member Avatar for noi80

Hello. I am currently working on a school project. I need to implement 4x4 matrix multiplication with multi-threads (pthread) doing each multiplication. By studying the assignment description and other codes found online, I was able to get a general idea of what I need to do. However, I am having …

Member Avatar for noi80
0
932
Member Avatar for sjcomp

Hello, In my program I have clipping planes setup for 60 degree field of view. I understand that near plane is in front of the camera and the far plane is further away from the camera. I would like to have a large field of view, let' say more than …

0
96
Member Avatar for jjepoy

it keeps on saying '{' token error. did I put something wrong that the program keeps on saying '{' token error? [code] #include <stdio.h> #include <math.h> int Calendar(int daycode,int year,int leapyear); void dec_bin(int bin) { int x, y; x = y = 0; for(y = 7; y >= 0; y--) …

Member Avatar for jjepoy
0
103
Member Avatar for NT.

Hi, I am thinking about something that I heard in a discussion and I am not sure whether it is really like that or not. Calculating a shortest path on a graph can be done either using dijkstra's algorithm , basically DFS or by BFS. There might be some other …

Member Avatar for NT.
0
105
Member Avatar for thEhAckEr

[code=splusplus]#include<iostream> #include<iomanip> using namespace std; int main() { int a[10][10],b[10][10],c[10][10],i,j,k,r1,r2,c1,c2; cout<<"Enter the order of I matrix\n"; cin>>r1>>c1; cout<<"Enter the order of II matrix\n"; cin>>r2>>c2; cout<<"Enter the "<<r1*c1<<" elements for I matrix \n"; for(i=0;i<r1;++i) for(j=0;j<c1;++j) cin>>a[i][j]; cout<<"Enter the "<<r2*c2<<" elements for II matrix \n"; for(i=0;i<r2;++i) for(j=0;j<c2;++j) cin>>b[i][j]; for(i=0;i<r1;++i) for(j=0;j<c2;++j) { c[i][j]=0; …

Member Avatar for thEhAckEr
0
92
Member Avatar for daviddoria

I'm just starting python and it seemed reasonable to go ahead and learn the new version. I read that numpy wont be available for python3 until at least 2010. All I need is a basic "vector", "matrix", and some basic functions like matrix/vector multiplication. Is anything like this available for …

Member Avatar for sneekula
0
136
Member Avatar for M'N'M

Please can anyone tell me why that program crashes when I enter the first matrix? [CODE]#include<iostream> #include <stdlib.h> #include <windows.h> using namespace std; void menu() { cout<<" \t\t\t\t*-*-UNIATIVE Matrix calculator-*-*\t\t\t\t "<<"\n"; cout<<" "<<(char)1<<" NNNN MMMM AAAA "<<(char)1<<" "<<"\n"; system ("color 08"); _sleep(1000); cout<<" \t\t\t *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\t\t\t"<<"\n"; cout<<"Ahlan washlan ya user Ya …

Member Avatar for tux4life
0
103
Member Avatar for ARYT

Hi everyone This should be one of our last assignments. Well, not sure, but most probably. As the title implies, we're supposed to write a program using multi-dimensional arrays for a 6x6 matrix multiplication. Here's what I've done. It's almost OK; except the most important part which is the final …

Member Avatar for GreenDay2001
0
525
Member Avatar for tasneemnikhat

hey ol, i dnt hav much time left to solve des Q's.. can u plz guide me solving des... Fundamental Exercise /* class design, dynamic memory allocation and operator overloading */ 1. Write a program to implement Matrix class. • Implement addition and multiplication operation • row and col of …

Member Avatar for tasneemnikhat
0
121
Member Avatar for gyagyus

Hi! I wrote two functions in order to access two private data members of a template class and I got the messages in the title every time I call these functions(getNcols(), getNrows()). I'd be very grateful for your help, guys... (Without the "template<class T>" before the friends, I got linker …

Member Avatar for gyagyus
1
242
Member Avatar for Dewey1040

I know there are multiple threads on Matrix Multiplication but all of them are either different from what i need, or are unanswered. I am trying to multiply two N x N matrices. The two matrices and N are all found in a file via argv[1]. I have spent hours …

Member Avatar for Dewey1040
0
151
Member Avatar for haven_u

can someone help mi out with how to write a simple(2X2) matrix....I need help only with the loop used..... I got a wrong answer with what i got below [code=cplusplus] const int Row = 2; const int Col = 2; int main() { int MatrixA[Row][Col] = {1,2,3,2}; int MatrixB[Row][Col] = …

Member Avatar for ddanbe
0
113
Member Avatar for xb211

Hi All, I'm currently working on my project (which try to perform degree reduction for a Bezier curve). I've spent a long time trying to find library or useful class to help me perform matrix inversion. For example degree reduction in Bezier's curve (let's say from degree 3 to degree …

Member Avatar for xb211
0
145
Member Avatar for bomtk

Hi everyone, I got problem with coding of matrix-matrix multi plication; Please help me to figure out this my problem is: Having a matrix, U2[k][i][j], with dimension of 9081x84 and other matrix, U[m][i][j], with dimension of 9081x4 i now want to multiply transpose of A with B, following is my …

Member Avatar for iamthwee
0
69
Member Avatar for a1159538

HI guys i am a beginner c++ programmer so hopefully this one will be easy for the gurus. i am trying to write a class to do matrix multiplication and then use it. In the class are 5 functions: one to define the dimensions of the matrix two to enter …

Member Avatar for a1159538
0
168
Member Avatar for Muttley

Hello, i have some problems implementing the following pseudo-code. Te problem is that in Pascal i can return user defined data structures (in this case: matrix), and i also tried to return it as a parameter with "var" but it gave a stack overflow error. Anyone can help me? pseudo …

Member Avatar for Duoas
0
202
Member Avatar for prashant.jnu

Dear all , I am not very much efficient in perl . I used to write small script of code usually by using file handler . I have written a code for multplication of 2*3 matrix . I want to use this code efficiently so that it can be any …

Member Avatar for KevinADC
0
149
Member Avatar for nony0905

[code]#include<stdio.h> #include<conio.h> #define MAX_ROWS 10 #define MAX_COLS 10 void add(int a[][MAX_COLS], int b[][MAX_COLS], int result[][MAX_COLS]); void displayValues(int(*)[MAX_COLS]); void diff(int a[][MAX_COLS], int b[][MAX_COLS], int result[][MAX_COLS]); void main() { int val; int i,j; int choice; int cols,rows; int operation; int table1[MAX_ROWS][MAX_COLS]; int table2[MAX_ROWS][MAX_COLS]; int result[MAX_ROWS][MAX_COLS]; clrscr(); printf("Press 1 to enter values for …

Member Avatar for Prabakar
0
145
Member Avatar for n.aggel

hi to everyone, In this semester we are having a class concerning High Performace computing / Parallel processing... In short i have the following questions: --- We are using pthreads and C. I think that i can use pthreads in c++ code but is there any way to use threads …

Member Avatar for n.aggel
0
174
Member Avatar for resooul

[code] class Program { static void Main(string[] args) { int m = 0; int n = 0; Console.Write("Enter M : "); m = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter N : "); n = Convert.ToInt32(Console.ReadLine()); Console.Write("{0} x {1} and {2} x 1 dimentional two matrix will be multiplied.\n",m,n,n); Console.Write("Enter {0} x {1} dimentional matrix …

0
53
Member Avatar for super star 90

please help to with this program by mainly using arrays and pointers ,... i need this program to check 2 matrix files "if they contain any character and if they contain cout<<"invalid"; " and to open them from .txt file Help with Code Tags cplusplus Syntax (Toggle Plain Text) [code] …

Member Avatar for Ancient Dragon
0
72
Member Avatar for zaza_thegreat

please help to with this program by mainly using arrays and pointers ,... i need this program to check 2 matrix files "if they contain any character and if they contain cout<<"invalid"; " and to open them from .txt file [code=cplusplus] #include<iostream> #include<fstream> #include<string> #include<cmath> using namespace std; int main() …

Member Avatar for Nick Evan
0
217
Member Avatar for soka2oo7

I want to know how to develop a matrix calculator that preforms basic matrix operations usin g arrays and/or pointers. Iwant a calculator to do addition ,subtraction ,multiplication ,transpose,checking enquality, checking properties and matrix power & the program will read the data from a file & check if the data …

Member Avatar for soka2oo7
0
123
Member Avatar for debee

Hello there, I am trying to build a square matrix of the type Double, with the following code: for( i = 0; i < weightVector.length; i++) for( j =0; j< weightVector.length; j++) { weightMatrix[i][j]= weightVector[i]* weightVector[j]; if(i==j) weightMatrix[i][i] += 0.0001; } The problem is each time the vector "weightVector" has …

Member Avatar for debee
0
87
Member Avatar for veeraiyan

hi i am new to eclipse i wrote a small programm in c++ using operator overloading if i compile normally no error but if compile through eclipse it is giving erorr message like "operator not mached " /*************************************************************/ this my main.cpp ************************************************************/ [code=cplusplus] #include <iostream> #include"use.h" #include"friend.h" using namespace std; …

0
44
Member Avatar for bhoot_jb

i hav coded a matrix class and its member functions (many of them are overloaded ones)...now in a function..for eg. function of matrix addition.. [B]after the addition i want to return the local object "result" through a pointer (and not call by value)..however i aint getting d values of the …

Member Avatar for bhoot_jb
0
259
Member Avatar for newport

I'm working on a matrix addition/multiplication/transpose/inverse program and after entering the values of matrix A, I don't know how to call these values. [CODE] int setMatrixA(int r1, int c1, int i, int j){ printf(" Enter the number of rows:\n"); scanf("%d", &r1); printf(" Enter the number of columns:\n"); scanf("%d", &c1); for(i=0; …

Member Avatar for jephthah
0
103
Member Avatar for iwilcox

Alright, so I am trying to create a program that will take a [m][n] Matrix and multiply it by a [n][p] Matrix, filling each matrix with increasing values. I am having a problem with my function, prototype, and call. I keep getting the "...not declared in this scope" error and …

Member Avatar for VernonDozier
0
152
Member Avatar for Mikesvb

Hi there.This is my first post here.I need help urgently. I getting desperate because I got a deadline for a project in 3 weeks time.I'm trying to do a 2 X 2 matrix multiplication applet that simulate systolic architecture.Should be something like the Wallace Tree Simulation. It can be seen …

Member Avatar for jbennet
0
118
Member Avatar for everlast

[code=cplusplus] #include <iostream> #include <iomanip> using namespace std; class Matrix { public: Matrix (int =0, int =0); ~Matrix (); Matrix (const Matrix&); void operator = (const Matrix&); Matrix operator + (const Matrix&); Matrix operator * (const Matrix&); Matrix operator - (const Matrix&); int* getMember(int =0, int =0) const; //returns pointer …

Member Avatar for everlast
0
145
Member Avatar for sweetangel_aiza

how can i solve this 2 problems?!can you please help me?! Another matrix algebra operation is determining the matrix which is the product of two matrices. This is more challenging extension of the previous problem. The rule governing matrix multiplication is that two can matrices can be multiplied if the …

Member Avatar for Ancient Dragon
0
125
Member Avatar for Duki

Hey everyone, I have an assignment to work on and it's a bit confusing. Here's the problem: [quote]Using dynamic arrays, implement a polynomial calss with polynomial additions, subtraction, and multiplication. Discussion: A variable in a polynomial does nothing but act as a placeholder for the coefficients. Hence, the only interesting …

Member Avatar for iamthwee
0
162
Member Avatar for anzdyy

Write a complete C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. The program should display the following menu to the user for them to select one of the five options listed. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX …

Member Avatar for Salem
0
110
Member Avatar for Killer_Typo

Since i am going to have to learn Smalltalk well enough to convert it to .NET ( or so i have been told ) i decided to convert some of the C++ tutorials to Smalltalk. Namely this one: Write a program which performs addition, subtraction, multiplication of matrices. The dimensions …

Member Avatar for Killer_Typo
0
213
Member Avatar for anzdyy

Write a complete C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. The program should display the following menu to the user for them to select one of the five options listed. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX …

Member Avatar for Salem
0
106
Member Avatar for Shailesh33

[COLOR=#000000]Hi, [/COLOR] [COLOR=#000000]I need help find the 3rd irreducible polynomial and then create an addition and multiplication table for the following polynomial function: [x4 + x3 + x2 + x +1] and also create BCH (4, 3) code, its code words and check matrix.[/COLOR]

Member Avatar for WolfPack
0
83
Member Avatar for solomon grundy

I need to Construct a program that inputs the entries of two matrices and multiplies them. Construct the program so that it gives an error message if they cannot be multiplied. What I have done so far I need to Construct a program that inputs the entries of two matrices …

Member Avatar for WaltP
0
109
Member Avatar for akadri

Does anyone have an idea about implementing two dimensional arrays in Python?? I want to write two programs: (1) a program for matrix multiplication (2) a program for displaying Pascal's triangle. Both these programs require two dimensional array..? Or is there any other way to solve this.. Thanks in anticipation.. …

Member Avatar for jrcagle
0
131

The End.