Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

95 lines (82 sloc) 2.812 kB
<!DOCTYPE html>
<html data-require="math matrix matrix-input">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Matrix transpose</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="MAT">makeMatrix(randRange(0, 9, DIM_1, DIM_2))</var>
<var id="SOLN_MAT">matrixTranspose(MAT)</var>
<var id="PADDED_SOLN_MAT">matrixPad(SOLN_MAT, 3, 3)</var>
<var id="PRETTY_MAT_ID">"\\textbf " + randFromArray("ABCDEF")</var>
<var id="PRETTY_SOLN_MAT">printSimpleMatrix(SOLN_MAT)</var>
</div>
<div class="problem">
<p>
<code><var>PRETTY_MAT_ID</var> = <var>printSimpleMatrix(MAT)</var></code>
</p>
</div>
<p class="question">
What is <code><var>PRETTY_MAT_ID</var>^{T}</code>?
</p>
<div class="hints">
<div>
<code><var>PRETTY_MAT_ID</var>^{T}</code> = <code><var>PRETTY_SOLN_MAT</var></code>
</div>
</div>
<div class="solution" data-type="multiple">
<div data-each="PADDED_SOLN_MAT as row" class="matrix-row">
<span data-each="row as elem">
<span data-if="elem !== ''" class="sol">
<var>elem</var>
</span>
<span data-else data-type="text" class="sol">
<var>elem</var>
</span>
</span>
</div>
</div>
<div class="problems">
<div id="1x2" data-weight="1">
<div class="vars" data-apply="prependVars">
<var id="DIM_1">1</var>
<var id="DIM_2">2</var>
</div>
</div>
<div id="2x2" data-weight="2">
<div class="vars" data-apply="prependVars">
<var id="DIM_1">2</var>
<var id="DIM_2">2</var>
</div>
</div>
<div id="2x3" data-weight="2">
<div class="vars" data-apply="prependVars">
<var id="DIM_1">2</var>
<var id="DIM_2">3</var>
</div>
</div>
<div id="3x1" data-weight="1">
<div class="vars" data-apply="prependVars">
<var id="DIM_1">3</var>
<var id="DIM_2">1</var>
</div>
</div>
<div id="3x2" data-weight="2">
<div class="vars" data-apply="prependVars">
<var id="DIM_1">3</var>
<var id="DIM_2">2</var>
</div>
</div>
<div id="3x3" data-weight="2">
<div class="vars" data-apply="prependVars">
<var id="DIM_1">3</var>
<var id="DIM_2">3</var>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.