473,408 Members | 2,477 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,408 software developers and data experts.

transpose of a matrix

hi i m too new to this site and c programming too can u post the program of transpose of matrix using arrays
Oct 11 '07 #1
4 3388
debasisdas
8,127 Expert 4TB
Question moved to C Forum.
Oct 11 '07 #2
Meetee
931 Expert Mod 512MB
hi i m too new to this site and c programming too can u post the program of transpose of matrix using arrays
Hi,

Welcome to TSDN. We can not post you full code but if you can post your efforts about the problem then someone can help you. Also search on Google.

Regards

PS. Please read posting guidelines.
Oct 11 '07 #3
JosAH
11,448 Expert 8TB
Note that for transposed matrix matT of matrix mat the following relation holds:

Expand|Select|Wrap|Line Numbers
  1. matT[i][j]= mat[j][i];
  2.  
Wrap this thing in two nested loops and you're in business.

kind regards,

Jos
Oct 11 '07 #4
Note that for transposed matrix matT of matrix mat the following relation holds:

Expand|Select|Wrap|Line Numbers
  1. matT[i][j]= mat[j][i];
  2.  
Wrap this thing in two nested loops and you're in business.

kind regards,

Jos
Do that and you are out of business.

1. you will lose elements as you are not swapping them just replacing and by the time you get to the other elements you are lost. So replace this simple statement be three statements , that first saves the target elements before swapping.

2. Now even if you fixed that in step 1. You are lost because, you will be first swapping and then re-swapping. the two nested loops are not enf, you have to check you swap only one side and other side is done
Oct 11 '07 #5

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

Similar topics

4
by: Tuong Do | last post by:
Hi I have a table with data like this ID Type 1 A 1 B 1 C 2 A 2 C
1
by: jenny.rhodes | last post by:
Hello, Please can anyone guide me on how to transpose an access table where I have many records per id eg UserID Question Answer 1 1 a 1 2 d 1 3 ...
1
by: Jenny | last post by:
Hello, Please can anyone guide me on how to transpose an access table where I have many records per id eg UserID Question Answer 1 1 a 1 2 d
7
by: sangeetha | last post by:
Hi, i need to transpose a nx1 matrix to 1xn matrix inorder to multiply with nxn matrix in c language ... can anyone help in this coding ..the nx1 matrix is pi the data type is double *pi..this is...
3
by: Gerard Brunick | last post by:
My way is ugly. These has to be a better way. Thanks, Gerard
0
by: shantanu | last post by:
I am trying to convert a macro code to c# that will copy the values of a column and paste to anather through paste special. Everything is working fine but the transpose meathod to paste the column...
2
by: prads | last post by:
Hello, Can anybody tell me how i shud go about to perform the transpose of a nonsquare matrix array. Pls give me an idea so that i can write one based on that and then post queries if errors r...
2
by: jbd | last post by:
Hi I'm adapting some code I've written using 2d arrays (to represent matrices) to handle large arrays such that double matrix goes to double **matrix and then I'm using malloc. It seems to work...
4
by: pc_whocares | last post by:
My forehead is flat from pounding. I am building a DLL in VS2005 C++ for use in another software development platform. I am required to pass my array data in/out of the function via a...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.