## Bug in Transpose in Mathematica 12.2?

``````*In(1)=* Transpose({a, b})
``````

returned in earlier versions of Mathematica (e.g Mathemtica 12.1) simply

``````*Out(1)=* Transpose({a, b})
``````

together with the warning: “Transpose::nmtx: The first two levels of {a,b} cannot be transposed.”

However in Mathematica 12.2 (on Windows10) the output is:

``````*Out(1)=* {a,b}
``````

The Transpose has disappeared. Is this a bug or a feature?

For me, it is problem, because this new behavior is breaking my existing code, where I have functions similar to:

``````getfromdatabase(key_String):=CallToCppCodeAndReturnListsOfValues(key)
getfromdatabase(expr_):=expr/. key_String :>  getfromdatabase(key)
``````

In previous versions (<12.2) users of my code could execute

``````getfromdatabase( Transpose({"firstname, "lastname", "salary"-"rent"}) )
``````

and the output was for example:

``````{ {David, Smith, somenumber}, {Lisa, Garbo, someothernumber}, ... }
``````

Now, in 12.2, one gets:

``````{ {David, Lisa,...}, {Smith, Garbo, ...}, {somenumber, someothernumber, ...}}
``````

How can I change getfromdatabase to get back the old output using the same input as before?
(Sure, in the example above, one could apply Transpose after calling the function. But in other calls there might be calls of Transpose more nested inside the expression, like `getfromdatabase( Transpose({"firstname, "lastname", Transpose({"salary","rent"})) )`)
Thanks!

## Integrate conjugate transpose

I can’t find the

Integrate[conjugate Transpose[u[x, t]] *D[u[x, t], {x, 1}],x]

In mathematica.
Thanks

## google apps script – Is there a way to transpose rows with an varying number of columns and replicate cells based on number of columns?

I have a Google Form featuring an name, date, and checkbox field capable of generating multiple choices, anywhere from 1 to 50. I’m looking to have this form filled monthly by hundreds of users.
When the data is exported to google sheets and multiple checkboxes are ticked, the output goes into a single field with a comma separator.

I’ve split that data using an array formula (=ARRAYFORMULA(IF(ROW(GI:GI)=1,””,IF(ISBLANK(C:C),,SPLIT(C:C,”,”)))), so that every checkbox becomes is given its own cell.

I would like to transpose and replicate the name based on the number of columns following the name:

I’ve tried a number of transpose, array and split formulas with no luck, and the pivot table. Since there would be several users and multiple column entries, I’m thinking that a script is needed.

Any helps would be appreciated.

Thank you,

## linear algebra – finding a transpose matrix

``````sample = MatrixForm[
RandomVariate[NormalDistribution[0, 1.2], {3, 2, 2}]]
Tranp = Transpose[MatrixForm[sample]]
``````

This is my attempt to find the transpose of three matrices, which have 2 by 2.
I want to transpose three matrices, but Mathematica does not show transpose matrices of them.
Can you help me?
Thank you!

## finder – Numbers: Possible to transpose Rows and Columns during Import of txt file?

I have a txt file which has 5,000 data points separated by commas.

i.e. data123,data456,data17,data918,etc,etc

If I open this txt file in Numbers, it creates each item as its own column, whereas I want each item to be its own row.

I can use the Table > Transpose Rows and Columns option, but Numbers is only able to have a maximum of 1,000 columns, and so there are 4,000 points of data that are missing from my spreadsheet using this method.

Is there a way that I can open the txt file in Numbers with the comma separated values each being created as a row instead of a column to begin with?

Thank you so much for any help!

I love the transpose date function above. Can you do the same thing with time in hour increments? If someone checks in at 2pm and checks out at 7pm, the cells to the right would count 2pm, 3pm, 4pm, 5pm, 6pm, 7pm, etc? That would be awesome.

Google Sheets have two different features for handling notes/comments, one is called notes, the other is called comments. While both could be attached to cells they could behave differently. Comments shows the profile picture of the user and have additional features like mentioning, mark as resolved, etc. that notes haven’t.

• Copy-Paste : Only notes are included on the new position
• Copy-Paste as transposed : Only notes are included on the new position
• Cut-Paste : Both notes and comments are moved to the new position.
• Using formulas to transpose a range : Notes and comments aren’t included

Google Apps Script could be used to transpose ranges and it will include notes but not comments.

Notes: Some documentation use the term comment to refer to notes.

## Producing a matrix not similar to its transpose

I know that a matrix is similar to its transpose, if the minimal polynomial over the field splits
Now how do I produce a matrix over $$mathbb{R}$$ that does not satisfy given property.

Can you give me a hint ?

## linear transformations with f transpose

I am half confused with the following problem..

(enter image description here)(1)

and
(enter image description here)(2)

Then (enter image description here)(3)is equal to

and i have 4 choices:
(enter image description here)(4)

I don’t understand when it says Nu (f∘f), the nucleus of a linear transformation is not zero?
I am quite confused: /. My idea was to get image and nucleus of f and then the associated matrix transposed. but I’m clearly confused.
(1): https://i.stack.imgur.com/N9s5H.png
(2): https://i.stack.imgur.com/NUEyl.png
(3): https://i.stack.imgur.com/MO9nl.png
(4): https://i.stack.imgur.com/z23Nz.png

## t sql – How can I transpose multiple unrelated columns into rows in SQL Server?

I have a table that looks like the following:

``````PersonId   EyeColor    HairColor    FavoriteTVShow      FavoriteMovie    FavoriteFood    BirthCity
---------- ----------- ------------ ------------------- ---------------- --------------- ------------------
A123       Brown       Black        The Price Is Right     The Godfather Pizza           New York City
A444       Green       Brown        Friends                Elf           Steak           Seattle
``````

My desired result set is this:

``````PersonId POS         ColorInfo FavoriteInfo       BirthCity
-------- ----------- --------- ------------------ -------------
A123     1           Brown     The Price Is Right New York City
A123     2           Black     The Godfather      NULL
A123     3           NULL      Pizza              NULL
A444     1           Green     Friends            Seattle
A444     2           Brown     Elf                NULL
A444     3           NULL      Steak              NULL
``````

So for each PersonId, each group of columns (2 ColorInfo, 3 FavoriteInfo, and 1 BirthCity) is transposed and a position field is added. I’ve tried variations of CROSS APPLY and UNPIVOT, but I can’t seem to get it just right. I know it’s a weird request, but can anyone think of a good way to do this?

Here’s the T-SQL:

``````--Create the table
CREATE TABLE #test (
PersonId VARCHAR(10),
EyeColor VARCHAR(20),
HairColor VARCHAR(20),
FavoriteTVShow VARCHAR(30),
FavoriteMovie VARCHAR(30),
FavoriteFood VARCHAR(30),
BirthCity VARCHAR(30)
)

--Populate the table
INSERT INTO #test
VALUES
('A123', 'Brown', 'Black', 'The Price Is Right', 'The Godfather', 'Pizza', 'New York City'),
('A444', 'Green', 'Brown', 'Friends', 'Elf', 'Steak', 'Seattle')

--See the original result set.
SELECT *
FROM #test

--My desired result set
SELECT *
FROM ( VALUES ('A123', 1, 'Brown', 'The Price Is Right', 'New York City'),
('A123', 2, 'Black', 'The Godfather', NULL),
('A123', 3, NULL, 'Pizza', NULL),
('A444', 1, 'Green', 'Friends', 'Seattle'),
('A444', 2, 'Brown', 'Elf', NULL),
('A444', 3, NULL, 'Steak', NULL) ) t (PersonId, POS, ColorInfo, FavoriteInfo, BirthCity)
``````