transpose, .'
转置向量或矩阵
说明
示例
实矩阵
创建由实数组成的矩阵并计算其转置。B
具有与 A
相同的元素,但是 B
的行是 A
的列,B
的列是 A
的行。
A = magic(4)
A = 4×4
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
B = A.'
B = 4×4
16 5 9 4
2 11 7 14
3 10 6 15
13 8 12 1
复矩阵
创建包含复数元素的矩阵并计算其非共轭转置。B
包含与 A
相同的元素,只是交换了行和列。虚部符号保持不变。
A = [1 3 4-1i 2+2i; 0+1i 1-1i 5 6-1i]
A = 2×4 complex
1.0000 + 0.0000i 3.0000 + 0.0000i 4.0000 - 1.0000i 2.0000 + 2.0000i
0.0000 + 1.0000i 1.0000 - 1.0000i 5.0000 + 0.0000i 6.0000 - 1.0000i
B = A.'
B = 4×2 complex
1.0000 + 0.0000i 0.0000 + 1.0000i
3.0000 + 0.0000i 1.0000 - 1.0000i
4.0000 - 1.0000i 5.0000 + 0.0000i
2.0000 + 2.0000i 6.0000 - 1.0000i
输入参数
A
— 输入数组
向量 | 矩阵
输入数组,指定为向量或矩阵。
数据类型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| char
| string
| struct
| cell
| categorical
| datetime
| duration
| calendarDuration
复数支持: 是
提示
复共轭转置运算符
A'
还对A
中复数元素的虚部符号求反。
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
GPU 代码生成
使用 GPU Coder™ 为 NVIDIA® GPU 生成 CUDA® 代码。
HDL 代码生成
使用 HDL Coder™ 为 FPGA 和 ASIC 设计生成 Verilog 代码和 VHDL 代码。
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
GPU 数组
通过使用 Parallel Computing Toolbox™ 在图形处理单元 (GPU) 上运行来加快代码执行。
transpose
函数完全支持 GPU 数组。要在 GPU 上运行该函数,请将输入数据指定为 gpuArray
(Parallel Computing Toolbox)。有关详细信息,请参阅Run MATLAB Functions on a GPU (Parallel Computing Toolbox)。
分布式数组
使用 Parallel Computing Toolbox™ 在集群的组合内存中对大型数组进行分区。
此函数完全支持分布式数组。有关详细信息,请参阅Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox)。
版本历史记录
在 R2006a 之前推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)