[matrices] update exercise
This commit is contained in:
parent
b67ceae781
commit
c0f54682f4
@ -14,7 +14,7 @@
|
||||
%%%%% text size %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
|
||||
\pagestyle{headandfoot}
|
||||
\header{{\bfseries\large Exercise 3}}{{\bfseries\large Matrices}}{{\bfseries\large 22. Oktober, 2019}}
|
||||
\header{{\bfseries\large Exercise 3}}{{\bfseries\large Matrices}}{{\bfseries\large 10. Oktober, 2020}}
|
||||
\firstpagefooter{Dr. Jan Grewe}{Phone: 29 74588}{Email:
|
||||
jan.grewe@uni-tuebingen.de}
|
||||
\runningfooter{}{\thepage}{}
|
||||
@ -54,11 +54,11 @@ following pattern:
|
||||
\begin{solution}
|
||||
\code{x = [7 3 5; 1 8 3; 8 6 4];\\disp(size(x))}
|
||||
\end{solution}
|
||||
\part Use the help to figure out how to get only the size along a certain dimension. Display the sizes of each dimension.
|
||||
\part Use the help to figure out how to get only the size along a certain dimension. Display the sizes of each dimension separately.
|
||||
\begin{solution}
|
||||
\code{disp(size(x, 1))}\\\code{disp(size(x, 2))}
|
||||
\end{solution}
|
||||
\part Copy the content at the position 3rd line, 2nd column to a new variable.
|
||||
\part Copy the content at the position 3rd line, 2nd column into a new variable.
|
||||
\begin{solution}
|
||||
\code{c = x(3, 2)}
|
||||
\end{solution}
|
||||
@ -109,7 +109,7 @@ following pattern:
|
||||
\code{y = M(:, [2:2:size(M,2)])}
|
||||
\end{solution}
|
||||
|
||||
\part Calculate the averages of lines 1, 3, and 5 (use the function \verb+mean+}, see help).
|
||||
\part Calculate the averages of lines 1, 3, and 5 (use the function \verb+mean+, see help).
|
||||
\begin{solution}
|
||||
\code{mean(M([1 3 5],:), 2)}
|
||||
\end{solution}
|
||||
|
Reference in New Issue
Block a user