# Matrix Help

Show 80 post(s) from this thread on one page
Page 2 of 2 First 12
• 03-05-2008
Dave_Sinkula
Why, do you want to close this thread?

Your urgency is not ours. Spamming the boards will decrease the likelihood of a reasonable response. Bumping threads ain't gonna help ya neither.
• 03-05-2008
HelpmeMark
TRust me I'm in lab right now trying to work on it, but the TA only gives vague answers. Well thanks for the help :) Can I have a title?
• 03-05-2008
Dave_Sinkula
Slacker?

C'mon, with instructions like this you can't even come up with a couple skeletal functions?
Quote:

Please use the following function names: SetMatrixA( ), DisplayMatrixA( ), AddMatrixBtoA( ) to perform the matrix addition, MultiplyMatrixBtoA( ) for matrix multiplication, TransposeMatrixA(), and InvertMatrixA().
• 03-05-2008
HelpmeMark
Code:

```void SetMatrix(double A[5][5], char z)         {         printf("Please enter matrix &#37;c:\n", z);         for(i=0; i<=rowA; i++)         {           for(j=0; j<=columnA; j++)           {           printf("Row %d, Column %d: ", i+1, j+1);           scanf("%lf", &A[i][j]);           }         }```

what does char z do in this statement
• 03-05-2008
VirtualAce
I'm very close to closing this thread since it's a blatant attempt by a lazy student to get someone else to do their homework.
• 03-05-2008
HelpmeMark
Quote:

Originally Posted by Bubba
I'm very close to closing this thread since it's a blatant attempt by a lazy student to get someone else to do their homework.

Guy with the cat icon is helping me out. I gave the portion on my code, but I don't completely understand what char z is. Is it a variable?
• 03-05-2008
Dave_Sinkula
Quote:

Originally Posted by HelpmeMark
Code:

```void SetMatrix(double A[5][5], char z)         {         printf("Please enter matrix %c:\n", z);         for(i=0; i<=rowA; i++)         {           for(j=0; j<=columnA; j++)           {           printf("Row %d, Column %d: ", i+1, j+1);           scanf("%lf", &A[i][j]);           }         }```

what does char z do in this statement

It appears to be used to indicate what the user is entering.

On the for loops, one typically wants to do < rather than <=.
• 03-05-2008
HelpmeMark
Help
• 03-05-2008
dwks

Quote:

Help
Don't bump threads! It's just going to make people less willing to respond. [/edit]

Quote:

Originally Posted by HelpmeMark
Guy with the cat icon is helping me out. I gave the portion on my code, but I don't completely understand what char z is. Is it a variable?

It is a parameter to the function SetMatrix(). A parameter is a way to pass information in (and sometimes out) of a function. Yes, it is a type of variable.

Here's a simple example:
Code:

```#include <iostream> void function(int parameter); int main() {     int value = 3;     function(value);     return 0; } void function(int parameter) {     std::cout << parameter << std::endl; }```
[edit=2] I suggest you have a quick look over these tutorials, especially the "function" one. cprogramming.com/tutorial.html [/edit]
• 03-05-2008
VirtualAce
So you are asked to code this and don't understand what a char is? Either your teacher/prof is going way too fast or you are not listening. I find it hard to believe you would have been given this type of assignment and yet know as little as you do about the language.

This is why I'm hesistant to help.
• 03-05-2008
whiteflags