Skip to content

Commit 7f8ee54

Browse files
committed
Add TRANSPOSE
1 parent ea48d22 commit 7f8ee54

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

_build/reference.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,13 @@
14821482
"signature": "DETERM (A[, toler])",
14831483
"type": "function"
14841484
},
1485+
{
1486+
"help": "Transpose of a vector or a 2D matrix.",
1487+
"keyword": "TRANSPOSE",
1488+
"nodeID": "1802",
1489+
"signature": "TRANSPOSE (A)",
1490+
"type": "function"
1491+
},
14851492
{
14861493
"help": "Returns the value of e raised to the power of x.",
14871494
"keyword": "EXP",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# TRANSPOSE
2+
3+
> A = TRANSPOSE (M)
4+
5+
Calculates the transpose `A` of a 2D matrix or a vector `M`.
6+
7+
### Example 1: Transpose of a vetor
8+
9+
```
10+
A = [1;2;3;4]
11+
print transpose(A) ' output: [1,2,3,4]
12+
```
13+
14+
### Example 2: Transpose of a matrix
15+
16+
```
17+
A = [1,2; 3,4; 5,6]
18+
print transpose(A) ' output: [1,3,5;2,4,6]
19+
```

_build/smallbasic.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@
299299
<item>TIMER</item>
300300
<item>TLOAD</item>
301301
<item>TRANSLATE</item>
302+
<item>TRANSPOSE</item>
302303
<item>TRIM</item>
303304
<item>TSAVE</item>
304305
<item>TXTH</item>

0 commit comments

Comments
 (0)