Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displa...
13年弱 前
解決済み
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
13年弱 前
解決済み
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
Non-scor...
13年弱 前
解決済み
Create incrementing array
Given a and b generate an output matrix as shown in following examples:
a=2
b=5
output=[2 20 200 2000 20000]
a=4
b...
13年弱 前
解決済み
06 - Matrix Equations 1
Define the vectors _aVec_ and _bVec_ and the matrix _aMat_:
<<http://samle.dk/STTBDP/Assignment1_2a.png>>
and
<<http:/...
13年弱 前
解決済み
Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix.
Example ...
13年弱 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
13年弱 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.