hai everyone, i would like someone to help me with a c++ program that adds, subtracts and multiply matrices
13 1566
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?
Sure, what do you have so far?
im still confused, i only have a program that displays the matrix
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?
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
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.
[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
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.
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
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.
now i understand the addition part, but still no idea of writing a code that adds the matrices
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?
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
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...?
Sign in to post your reply or Sign up for a free account.
Similar topics
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
|
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...
|
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...
|
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:
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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...
| |