291 Topics
![]() | |
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 … | |
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... … | |
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 … | |
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 … | |
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 … | |
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--) … | |
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 … | |
[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; … | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
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] = … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
[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 … | |
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] … | |
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() … | |
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 … | |
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 … | |
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; … | |
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 … | |
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; … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
[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] | |
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 … | |
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.. … |
The End.