Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...
9年以上 前
解決済み
Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...
number of groups
In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...
9年以上 前
解決済み
Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix.
examples:
Input A=[1 2 3 5 6;52 58 56 45...
9年以上 前
解決済み
Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...
9年以上 前
解決済み
Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_.
...
9年以上 前
解決済み
Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1.
Example:
Input
...
9年以上 前
解決済み
Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices.
Example input...