Ansys Optics Help Center home page
Products
  • Ansys Optics
  • Downloads
  • What's new
  • Ansys Help
Solutions
  • Lumerical
  • Zemax
  • Speos
Learn
  • Ansys Innovation Courses (AIC)
  • Ansys Learning Hub (ALH)
  • Webinars
  • On-Demand Webinars
  • White Papers
Get Help
  • Welcome Guide
  • Ansys Learning Forum (ALF)
  • Lumerical Ideas Exchange (IX)
  • Ansys Support (ACSS)
  • How to Register for Support
Evaluate for Free
  • Lumerical
  • Zemax
  • Speos
  1. Ansys Optics
  2. Scripting Language
  3. Commands

TOP

transpose - Script command

FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT

Transposes a 1D or 2D matrix.

Syntax

Description

y = transpose(x);

If x is an N x M matrix, then y will be M x N, where the entries are y(j,i)=x(i,j).

Example

Simple example of how to transpose a 2D matrix.

?A = [1,2,3;4,5,6];
?AT = transpose(A); # transpose of A
result:
1  2  3  
4  5  6  
result: 
1  4  
2  5  
3  6  

See Also

List of commands , ctranspose , reshape , flip , permute , size

Associated files

Related articles

  • Lumerical scripting language - By category
  • Lumerical scripting language - Alphabetical list
  • findpeaks - Script command
  • Group delay analysis
  • Polarization-Sensitive Plasmonic Reflectors for HUD

Products

  • Ansys Optics
  • Downloads
  • What's new
  • Ansys Help

Solutions

  • Lumerical
  • Zemax
  • Speos

Learn

  • Ansys Innovation Courses
  • Ansys Learning Hub
  • Webinars
  • On-Demand Webinars
  • White Papers

Get Help

  • Ansys Learning Forum
  • Lumerical Ideas Exchange
  • Ansys Support
  • How to Register for Support

Evaluate for Free

  • Lumerical
  • Zemax
  • Speos
Hear the Latest from Ansys

Copyright 2025 Ansys Canada Ltd.


Ansys
  • Terms of Service
  • Cookie Policy
  • Privacy Policy
  • Legal Notices