What are the answers to the Associate Exam Practice Questions?

16 ビュー (過去 30 日間)
Dan Haugen
Dan Haugen 2015 年 10 月 13 日
コメント済み: Steven Lord 2025 年 5 月 2 日
I got c,b,c,b,a but I would like a confirmed answer. See: http://www.mathworks.com/services/training/certification/exam-questions.html
  3 件のコメント
Rik
Rik 2019 年 11 月 10 日
Comment posted as answer by Keith Meyers:
Why does A for the first question work? It doesn't make any logical sense and it shouldn't work. Can someone explain where they found that way to get the corners?
Guillaume
Guillaume 2019 年 11 月 11 日
Why doesn't it make any logical sense? What code do you use to get the inner 2x2 matrix of a 4x6 matrix:
M(2:3, 3:4)
%which is the same as
M([2 3], [3 4])
which basically returns the intersection of rows 2 and 3 with columns 3 and 4. With the same logic,
M([1, end], [1, end])
is the intersection of 1st and last row with 1st and last column, hence the 4 corners.

サインインしてコメントする。

回答 (4 件)

Decky
Decky 2018 年 4 月 9 日
I got C D C A D.
  2 件のコメント
Guillaume
Guillaume 2018 年 4 月 9 日
編集済み: Guillaume 2018 年 4 月 9 日
Try harder! The correct answers are A, D, C, A, D. C for the first question is going to result in an error. You can't use a cell array to index a matrix.
Ahmed Hassan
Ahmed Hassan 2020 年 10 月 13 日
Indeed, the correct answers are: A, D, C, A, D

サインインしてコメントする。


David Verrelli
David Verrelli 2016 年 2 月 1 日
The questions are more difficult than they might appear. After testing in MATLAB I could confirm the correct answers, and I recommend this practical approach to others. (And if you then don't understand why, then read the documentation on each command.) By my count the first Dan got 1/5, and the second Dan got 3/5.... —DIV

Daniel Chappell
Daniel Chappell 2015 年 10 月 14 日
C - four corners, so four elements indexed B - number of positive elements divided by the total number of elements C - index with end, and set this element to blank A - x-axis appears as first argument (plot(time, acceleration) D - std(Z) is a column-wise (default) statistical function
  1 件のコメント
Helen Kirby
Helen Kirby 2016 年 2 月 22 日
Re: the first one: Sounds logical, but actually doesn't work if you try that command out. The answer is A

サインインしてコメントする。


Adam
Adam 2025 年 5 月 2 日
For your confusion on the first question, which is the same confusion that I had for it. Try thinking about it like this, for taking values out of a matrix, inside the parentheses (row values, column values). By using bracket notation, you can specify the specific row and column values. Thus the ([1:end] <--- calls for the first and last row value, while the ,[1:end] calls for the first and last column value which corresponds to the row values you have called. Thus you get (1,1) (1,end) (end,1) and (end,end).
  1 件のコメント
Steven Lord
Steven Lord 2025 年 5 月 2 日
Yes. You can think of it this way: if vector1 and vector2 are vectors of row/column numbers as opposed to logical vectors, A(vector1, vector2) are all the elements at the intersections of rows whose numbers are specified in vector1 and columns whose numbers are specified in vector2.
A = magic(5)
A = 5×5
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
rows = [4 2];
cols = [5 3 1];
allNumbersInSpecifiedRows = A(rows, :)
allNumbersInSpecifiedRows = 2×5
10 12 19 21 3 23 5 7 14 16
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
allNumbersInSpecifiedColumnsInSpecifiedRows = allNumbersInSpecifiedRows(:, cols)
allNumbersInSpecifiedColumnsInSpecifiedRows = 2×3
3 19 10 16 7 23
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
answer = A(rows, cols)
answer = 2×3
3 19 10 16 7 23
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by