473,399 Members | 3,302 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,399 software developers and data experts.

Transpose of a non-square matrix

25
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 found. Say i have an array a[10] whose transpose is reqd?
Thanks,
Prads
Nov 3 '07 #1
2 6754
oler1s
671 Expert 512MB
An array of 10 of is effectively one row and 10 columns. It's transpose is one 1 column and 10 rows.

Before you can assign any numbers, you need to get the appropriate data type. It's multi-dimensional arrays obviously, so let's see some code (or pseudocode logic) that shows how you create the array for the transpose.
Nov 4 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
And keep in mind that in C++
Expand|Select|Wrap|Line Numbers
  1.  
  2. int array[10][1];
  3.  
  4. int arrayA[1][10];
  5.  
have exactly the same memory layout as int arr[10]

Expand|Select|Wrap|Line Numbers
  1.  
  2. int array[5][10];
  3.  
  4. int arrayA[10][5];
  5.  
have exactly the same memory layout as int arr[50].

I believe you can do the transpose with a typecast.
Nov 4 '07 #3

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

Similar topics

6
by: Raoul | last post by:
It appears that matrixmultiply(A,B) has a side-effect of transposing the second argument (B). Is this supposed to happen? Is there anyway to prevent it from transposing? This shows what...
2
by: Babu Mannaravalappil | last post by:
Hi, I want to replace some words in my text files (actually transpose). For example, I have a whole lot of expressions (words) in my files as follows: TABLECUSTOMERS TABLEORDERS...
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
1
by: Chris Smith | last post by:
Experience Posters, Sorry if this is not the right group to post this question. He is my issue; Is there a way without the use of 3rd party controls, to transpose the rows of a datatable to...
7
by: Leszek Gruszka | last post by:
I wrote an aplication that write something into tableA in sql2000. I want to write the same, but transposed into tableB. Someone can help me? Any example? *** Sent via Developersdex...
6
by: JayDawg | last post by:
Excel has this cool little function where you can copy data, and then paste it transposed so that which runs across the rows now runs down a colum and visa versa. Is there a way in access to...
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...
5
by: jenniferhelen | last post by:
I have been searching threads for a while and found the instructions listed below many times, however when I get to step 6 and select to save, I always receive the following error, "The information...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.