summaryrefslogtreecommitdiff
path: root/book/module1/array.tex
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2025-04-29 18:38:21 -0600
committerChristian Kolset <christian.kolset@gmail.com>2025-04-29 18:38:21 -0600
commitdc13208abd61cc3ac7c64a4373f3ad85689f1293 (patch)
treeb8775c75daefe5c5f183b7fbb561b6d18e82f0d3 /book/module1/array.tex
parentce478a33e25759b901d401609175713a5ded3522 (diff)
Finished of module 1 tutorials (.md) and added documentation to module 2
Diffstat (limited to 'book/module1/array.tex')
-rw-r--r--book/module1/array.tex19
1 files changed, 5 insertions, 14 deletions
diff --git a/book/module1/array.tex b/book/module1/array.tex
index c79c6c0..9482065 100644
--- a/book/module1/array.tex
+++ b/book/module1/array.tex
@@ -35,13 +35,7 @@ the value of the element as a property. In other words, if we were to
analyze the stress concentration of an aluminum block, the property
would be stress.
-\begin{itemize}
-\tightlist
-\item
- From
- \href{https://numpy.org/doc/2.2/user/absolute_beginners.html}{Numpy
- documentation} \includegraphics{figures/multi-dimensional-array.gif}
-\end{itemize}
+\includegraphics{figures/multi-dimensional-array.png}
If the load on this block changes over time, then we may want to add a
4th dimension i.e.~additional sets of 3-D arrays for each time
@@ -197,7 +191,7 @@ recorded as a function of time.
\begin{Highlighting}[]
\NormalTok{thrust\_lbf }\OperatorTok{=}\NormalTok{ np.array(}\FloatTok{0.603355}\NormalTok{, }\FloatTok{2.019083}\NormalTok{, }\FloatTok{2.808092}\NormalTok{, }\FloatTok{4.054973}\NormalTok{, }\FloatTok{1.136618}\NormalTok{, }\FloatTok{0.943668}\NormalTok{)}
-\OperatorTok{\textgreater{}\textgreater{}\textgreater{}}\NormalTok{ thrust\_lbs[}\DecValTok{3}\NormalTok{]}
+\BuiltInTok{print}\NormalTok{(thrust\_lbs[}\DecValTok{3}\NormalTok{])}
\end{Highlighting}
\end{Shaded}
@@ -211,10 +205,7 @@ product - \texttt{np.matmul()} for matrix multiplication -
\#\#\#\#\# Statistics - \texttt{np.mean()}, \texttt{np.median()},
\texttt{np.std()}, \texttt{np.var()} - \texttt{np.min()},
\texttt{np.max()}, \texttt{np.argmin()}, \texttt{np.argmax()} -
-Summation along axes: \texttt{np.sum(arr,\ axis=0)} \#\#\#\#\# Combining
-arrays - Concatenation: \texttt{np.concatenate((arr1,\ arr2),\ axis=0)}
-- Stacking: \texttt{np.vstack()}, \texttt{np.hstack()} - Splitting:
-\texttt{np.split()}
+Summation along axes: \texttt{np.sum(arr,\ axis=0)}
\subsection{Exercise}\label{exercise}
@@ -256,9 +247,9 @@ point must be zero.
\subparagraph{System of Equations:}\label{system-of-equations}
-\{RA+RB−10−15−20=05(10)+10(15)+15(20)−20RB=020RA−5(10)−10(15)−15(20)=0
-
+\[
\begin{cases} R_A + R_B - 10 - 15 - 20 = 0 \\ 5(10) + 10(15) + 15(20) - 20 R_B = 0 \\ 20 R_A - 5(10) - 10(15) - 15(20) = 0 \end{cases}
+\]
\subsubsection{Solution}\label{solution}