Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

$%MTXTRP

Draft MDC Standard

2 MATH Library
2.46 MTXTRP

MTXTRP(A,R,M,N) ;
	; Transpose A[M,N], result goes to R[N,M]
	If $Data(A)<10 Quit 0
	If $Get(M)<1 Quit 0
	If $Get(N)<1 Quit 0
	;
	New I,J,K,D1,V1,D2,V2
	For I=1:1:M+N–1 For J=1:1:I+1\2 Do
	. Set K=I-J+1
	. If K=J Do  Quit
	. . Set V1=$Get(A(J,J)),D1=$Data(A(J,J))#2
	. . If J'>N,J'>M KValue R(J,J) Set:D1 R(J,J)=V1
	. . Quit
	. ;
	. Set V1=$Get(A(K,J)),D1=$Data(A(K,J))#2
	. Set V2=$Get(A(J,K)),D2=$Data(A(J,K))#2
	. If K'>M,J'>N KValue R(K,J) Set:D2 R(K,J)=V2
	. If J'>M,K'>N KValue R(J,K) Set:D1 R(J,K)=V1
	. Quit
	Quit 1
Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 16-Nov-2023, 16:52:53.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)