473,385 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

addtion of matrices

7
hai everyone, i would like someone to help me with a c++ program that adds, subtracts and multiply matrices
Aug 20 '07 #1
13 1566
sicarie
4,677 Expert Mod 4TB
hai everyone, i would like some to help me with a c++ program that adds, subtracts and multiply matrices
Sure, what do you have so far?
Aug 20 '07 #2
luvuyo
7
Sure, what do you have so far?
im still confused, i only have a program that displays the matrix
Aug 20 '07 #3
sicarie
4,677 Expert Mod 4TB
im still confused, i only have a program that displays the matrix
Ok, well, then lets start with just the addition part.

Do you know how you would add two matricies by hand?
Aug 20 '07 #4
luvuyo
7
Ok, well, then lets start with just the addition part.

Do you know how you would add two matricies by hand?
The problem is, i am not doing applied maths or anything that does matrices and i think thats where the problem is
Aug 20 '07 #5
sicarie
4,677 Expert Mod 4TB
That's still okay - you can figure this stuff out, you just need to have an idea of what you are doing when you code, or else you're not going to be able to get started.

I approached it this way:

http://www.google.com/search?hl=en&q...=Google+Search

A Google search. So look through those. It seems pretty straightforward.
Aug 20 '07 #6
luvuyo
7
[quote=luvuyo]The problem is, i am not doing applied maths or anything that does matrices and i think thats where the problem is
so, will you please help me
Aug 20 '07 #7
sicarie
4,677 Expert Mod 4TB
The problem is, i am not doing applied maths or anything that does matrices and i think thats where the problem is
so, will you please help me
That's what I'm trying to do. Did you look through those links and do you understand how to do matrix addition? Next we have to build an algorithm, and then you can code. But it starts with you understanding how matrix addition works. Then once we do that, you can do the subtraction and multiplication on your own.
Aug 20 '07 #8
luvuyo
7
Ok, well, then lets start with just the addition part.

Do you know how you would add two matricies by hand?
The problem is, i am not doing applied maths or anything that does matrices and i think thats where the problem is
Aug 20 '07 #9
sicarie
4,677 Expert Mod 4TB
That's still okay - you can figure this stuff out, you just need to have an idea of what you are doing when you code, or else you're not going to be able to get started.

I approached it this way:

http://www.google.com/search?hl=en&q...=Google+Search

A Google search. So look through those. It seems pretty straightforward.
Click on the link. Read a few of the returns about matrix multiplication. If you can do regular multiplication, you can do matrix multiplication.
Aug 20 '07 #10
luvuyo
7
now i understand the addition part, but still no idea of writing a code that adds the matrices
Aug 20 '07 #11
sicarie
4,677 Expert Mod 4TB
now i understand the addition part, but still no idea of writing a code that adds the matrices
We're building up to that. You can't just jump in and start coding - that gets you lost. It's like traveling, you need a map. Sometimes you can just take off and end up in the right place, but you're likely to make a few wrong turns, and not end up where you wanted to go.

So, our "map" is our algorithm. Are the matricies you are going to be working with of a fixed size? (ie always going to be 4x4 or 5x5) Or are they going to change?
Aug 20 '07 #12
luvuyo
7
We're building up to that. You can't just jump in and start coding - that gets you lost. It's like traveling, you need a map. Sometimes you can just take off and end up in the right place, but you're likely to make a few wrong turns, and not end up where you wanted to go.

So, our "map" is our algorithm. Are the matricies you are going to be working with of a fixed size? (ie always going to be 4x4 or 5x5) Or are they going to change?
They are going to changes sir
Aug 20 '07 #13
sicarie
4,677 Expert Mod 4TB
They are going to changes sir
Ok, do you know how they will be read in? Will they be passed in an array, read from a file, entered in command line, etc...?
Aug 20 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Nils Wagner | last post by:
Hi all, Has someone written a C binding to transfer matrices from C to Python and vice versa ? Any pointer would be appreciated. Nils
3
by: tommy | last post by:
Hello everyone, I'm trying to write a program which will be adding and subtracting two matrices. I've already written some code but there are a few problems. 1) During compilation I get this...
8
by: Noesis Strategy | last post by:
I am attempting to build a database that profiles about 50 companies in a single industries. In a standard MS Word format, each profile would be about 20 pages of dense text and tables. In order...
3
by: Prototipo | last post by:
Hi! I need to dynamically create X vectors of matrices (with a known size of 5x5). It's like a three-dimensional matrix with 2 known dimensions and the third unknown. I have something like: ...
1
emaghero
by: emaghero | last post by:
Does anybody know an algorithm for the fast multiplication of three n-x-n symmetric matrices? I have an algorithm, which I'm not too pleased with, that does the job. Does anybody know a faster...
9
by: tomamil | last post by:
imagine that you have different matrices with different names and you want to perform the same action with each of them. is it possible to put their names into some array and to create a loop that...
5
by: td0g03 | last post by:
This program adds two square matrices - Algorithm 1-3, Page 35. Change it to implement the generalized algorithm to add two m x n matrices. Matrices, in general, are not square or n x n...
2
by: debiasri | last post by:
I have to devide a matrix in variable no of matrices with each having variable no of rows. Like I have to devide a matrix with dim.9X19 into say 4 matrices with row nos 1,6,6,6 respectively, and I...
5
by: adinda | last post by:
So what i need is this; (I'm very new at this,, programming in C I mean...) In matlab I had a while loop, and after each loop was done I added my resulting matrix to an object. Seeing the loop...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.