|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <title>SmallBASIC | TRANSPOSE</title> |
| 8 | + <meta name="description" content="Transpose of a vector or a 2D matrix."> |
| 9 | + <link rel="canonical" href="1802"> |
| 10 | + <link rel="keywords" href="TRANSPOSE (A)"> |
| 11 | + <link rel="stylesheet" href="/css/style.css"> |
| 12 | + <link rel="icon" type="image/png" href="/images/sb-desktop-32x32.png"> |
| 13 | + <script src="/clipboard.js"></script> |
| 14 | +</head> |
| 15 | + <body> |
| 16 | +<div class="wrapAll clearfix"> |
| 17 | + <div class="sidebar"> |
| 18 | + <div class="logo"> |
| 19 | + <a href="/"><img src='/images/sb-desktop-128x128.png' alt="logo"></a> |
| 20 | + </div> |
| 21 | + <div class="navigation"> |
| 22 | + <h4>SmallBASIC</h4> |
| 23 | + <ul> |
| 24 | + <li><a href="/">Main page</a></li> |
| 25 | + <li><a href="/pages/download.html">Download</a></li> |
| 26 | + <li><a href="/pages/reference.html">Language reference</a></li> |
| 27 | + <li><a href="/pages/samples.html">Code library</a></li> |
| 28 | + </ul> |
| 29 | + <hr class="menuSeparator"/> |
| 30 | + <ul> |
| 31 | + <li><a href="/pages/articles.html">Articles</a></li> |
| 32 | + <li><a href="/pages/community.html">Community</a></li> |
| 33 | + <li><a href="/pages/changelog.html">Changelog</a></li> |
| 34 | + <li><a href="/pages/screenshots.html">Screenshots</a></li> |
| 35 | + <li><a href="/pages/links.html">Links</a></li> |
| 36 | + </ul> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + <div class="mainsection"> |
| 40 | + <div class="tabs clearfix"> |
| 41 | + <div class="tabsLeft"> |
| 42 | + <ul> |
| 43 | + <li><a href="#" class="active">Article</a></li> |
| 44 | + <li><a href="https://www.syntaxbomb.com/smallbasic">Discuss</a></li> |
| 45 | + </ul> |
| 46 | + </div> |
| 47 | + <div id="simpleSearch"> |
| 48 | + <form action="https://github.com/smallbasic/smallbasic.github.io/search" |
| 49 | + target="_github" accept-charset="UTF-8" method="get" style="display:inline"> |
| 50 | + <div id="submitSearch"> |
| 51 | + <button type="submit"> </button> |
| 52 | + <input type="hidden" class="js-site-search-type-field" name="type"> |
| 53 | + <input type="hidden" name="utf8" value="✓"> |
| 54 | + <input type="hidden" name="l" value="Visual Basic"> |
| 55 | + <input type="text" name="q" placeholder="Search" id="searchInput"> |
| 56 | + </div> |
| 57 | + </form> |
| 58 | + </div> |
| 59 | + <div class="tabsRight"> |
| 60 | + <ul> |
| 61 | + <li><a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/reference/1802-math-transpose.markdown">View source</a></li> |
| 62 | + <li><a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/reference/1802-math-transpose.markdown">View history</a></li> |
| 63 | + </ul> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | +<div class="article"> |
| 67 | + <h1>TRANSPOSE</h1> |
| 68 | + <blockquote>A = TRANSPOSE (M)</blockquote> |
| 69 | + <div class="siteSub"> |
| 70 | + <p> |
| 71 | + <a href="/">Home</a> > |
| 72 | + <a href="/pages/reference.html">Reference</a> > |
| 73 | + <a href="/pages/math.html">Math</a> |
| 74 | + </p> |
| 75 | + </div> |
| 76 | +<p>Calculates the transpose <code>A</code> of a 2D matrix or a vector |
| 77 | +<code>M</code>.</p> |
| 78 | +<h3 id="example-1-transpose-of-a-vetor">Example 1: Transpose of a |
| 79 | +vetor</h3> |
| 80 | +<div class="sourceCode" id="cb1"><pre |
| 81 | +class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>A = [<span class="dv">1</span>;<span class="dv">2</span>;<span class="dv">3</span>;<span class="dv">4</span>]</span> |
| 82 | +<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="kw">print</span> <span class="fu">transpose</span>(A) <span class="co">' output: [1,2,3,4]</span></span></code></pre></div> |
| 83 | +<h3 id="example-2-transpose-of-a-matrix">Example 2: Transpose of a |
| 84 | +matrix</h3> |
| 85 | +<div class="sourceCode" id="cb2"><pre |
| 86 | +class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>A = [<span class="dv">1</span>,<span class="dv">2</span>; <span class="dv">3</span>,<span class="dv">4</span>; <span class="dv">5</span>,<span class="dv">6</span>]</span> |
| 87 | +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="kw">print</span> <span class="fu">transpose</span>(A) <span class="co">' output: [1,3,5;2,4,6] </span></span></code></pre></div> |
| 88 | + <div class="lavenderBox"> |
| 89 | + <div class="header">Math</div> |
| 90 | + <div class="linklist"> |
| 91 | + <a href="/reference/704.html">ABS </a> |
| 92 | + <a href="/reference/705.html">ABSMAX </a> |
| 93 | + <a href="/reference/706.html">ABSMIN </a> |
| 94 | + <a href="/reference/707.html">ACOS </a> |
| 95 | + <a href="/reference/708.html">ACOSH </a> |
| 96 | + <a href="/reference/709.html">ACOT </a> |
| 97 | + <a href="/reference/710.html">ACOTH </a> |
| 98 | + <a href="/reference/711.html">ACSC </a> |
| 99 | + <a href="/reference/712.html">ACSCH </a> |
| 100 | + <a href="/reference/713.html">ASEC </a> |
| 101 | + <a href="/reference/714.html">ASECH </a> |
| 102 | + <a href="/reference/715.html">ASIN </a> |
| 103 | + <a href="/reference/716.html">ASINH </a> |
| 104 | + <a href="/reference/717.html">ATAN </a> |
| 105 | + <a href="/reference/718.html">ATAN2 </a> |
| 106 | + <a href="/reference/719.html">ATANH </a> |
| 107 | + <a href="/reference/720.html">ATN </a> |
| 108 | + <a href="/reference/721.html">CEIL </a> |
| 109 | + <a href="/reference/722.html">COS </a> |
| 110 | + <a href="/reference/723.html">COSH </a> |
| 111 | + <a href="/reference/724.html">COT </a> |
| 112 | + <a href="/reference/725.html">COTH </a> |
| 113 | + <a href="/reference/726.html">CSC </a> |
| 114 | + <a href="/reference/727.html">CSCH </a> |
| 115 | + <a href="/reference/728.html">DEG </a> |
| 116 | + <a href="/reference/693.html">DERIV </a> |
| 117 | + <a href="/reference/729.html">DETERM </a> |
| 118 | + <a href="/reference/694.html">DIFFEQN </a> |
| 119 | + <a href="/reference/730.html">EXP </a> |
| 120 | + <a href="/reference/695.html">EXPRSEQ </a> |
| 121 | + <a href="/reference/731.html">FIX </a> |
| 122 | + <a href="/reference/732.html">FLOOR </a> |
| 123 | + <a href="/reference/733.html">FRAC </a> |
| 124 | + <a href="/reference/734.html">INT </a> |
| 125 | + <a href="/reference/696.html">INTERSECT </a> |
| 126 | + <a href="/reference/735.html">INVERSE </a> |
| 127 | + <a href="/reference/736.html">LINEQN </a> |
| 128 | + <a href="/reference/737.html">LOG </a> |
| 129 | + <a href="/reference/738.html">LOG10 </a> |
| 130 | + <a href="/reference/697.html">M3APPLY </a> |
| 131 | + <a href="/reference/698.html">M3IDENT </a> |
| 132 | + <a href="/reference/699.html">M3ROTATE </a> |
| 133 | + <a href="/reference/700.html">M3SCALE </a> |
| 134 | + <a href="/reference/701.html">M3TRANS </a> |
| 135 | + <a href="/reference/739.html">MAX </a> |
| 136 | + <a href="/reference/740.html">MIN </a> |
| 137 | + <a href="/reference/741.html">POLYAREA </a> |
| 138 | + <a href="/reference/742.html">POLYCENT </a> |
| 139 | + <a href="/reference/702.html">POLYEXT </a> |
| 140 | + <a href="/reference/743.html">POW </a> |
| 141 | + <a href="/reference/744.html">PTDISTLN </a> |
| 142 | + <a href="/reference/745.html">PTDISTSEG </a> |
| 143 | + <a href="/reference/746.html">PTSIGN </a> |
| 144 | + <a href="/reference/747.html">RAD </a> |
| 145 | + <a href="/reference/748.html">RND </a> |
| 146 | + <a href="/reference/703.html">ROOT </a> |
| 147 | + <a href="/reference/749.html">ROUND </a> |
| 148 | + <a href="/reference/750.html">SEC </a> |
| 149 | + <a href="/reference/751.html">SECH </a> |
| 150 | + <a href="/reference/752.html">SEGCOS </a> |
| 151 | + <a href="/reference/753.html">SEGLEN </a> |
| 152 | + <a href="/reference/754.html">SEGSIN </a> |
| 153 | + <a href="/reference/755.html">SEQ </a> |
| 154 | + <a href="/reference/756.html">SGN </a> |
| 155 | + <a href="/reference/757.html">SIN </a> |
| 156 | + <a href="/reference/758.html">SINH </a> |
| 157 | + <a href="/reference/759.html">SQR </a> |
| 158 | + <a href="/reference/760.html">STATMEAN </a> |
| 159 | + <a href="/reference/761.html">STATMEANDEV </a> |
| 160 | + <a href="/reference/1801.html">STATMEDIAN </a> |
| 161 | + <a href="/reference/762.html">STATSPREADP </a> |
| 162 | + <a href="/reference/763.html">STATSPREADS </a> |
| 163 | + <a href="/reference/1800.html">STATSTD </a> |
| 164 | + <a href="/reference/764.html">SUM </a> |
| 165 | + <a href="/reference/765.html">SUMSQ </a> |
| 166 | + <a href="/reference/766.html">TAN </a> |
| 167 | + <a href="/reference/767.html">TANH </a> |
| 168 | + <a href="/reference/1802.html"><strong>TRANSPOSE</strong> </a> |
| 169 | + </div> |
| 170 | + <div class="subtitle"> |
| 171 | + If there is insufficient information on this page and you wish learn more about TRANSPOSE, |
| 172 | + please send an email to [email protected]. You can help to improve information about |
| 173 | +TRANSPOSE by submitting a <a href="https://github.com/smallbasic/smallbasic.github.io/pulls">pull request</a>, |
| 174 | + click View Source for details. Note, an offline language reference text file is also available - see the Download section. |
| 175 | + </div> |
| 176 | + </div> |
| 177 | + <div class="categories"> |
| 178 | + <a href="/pages/console.html">Console </a> |
| 179 | + <a href="/pages/data.html">Data </a> |
| 180 | + <a href="/pages/date.html">Date </a> |
| 181 | + <a href="/pages/file.html">File </a> |
| 182 | + <a href="/pages/graphics.html">Graphics </a> |
| 183 | + <a href="/pages/language.html">Language </a> |
| 184 | + <a href="/pages/math.html">Math </a> |
| 185 | + <a href="/pages/string.html">String </a> |
| 186 | + <a href="/pages/system.html">System </a> |
| 187 | + </div> |
| 188 | +</div> |
| 189 | + <div class="pagefooter"> |
| 190 | + This page was last edited on Sat, 18 May 2024 23:57:33 +0200 |
| 191 | + | |
| 192 | + <a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a> |
| 193 | + processed with |
| 194 | + <a href="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 3.1.3</a> |
| 195 | + | Template by <a href="http://html5-templates.com/" target="_blank" rel="nofollow">HTML5 Templates</a> |
| 196 | + </div> |
| 197 | + </div> |
| 198 | +</div> |
| 199 | + </body> |
| 200 | +</html> |
0 commit comments