Create times-tables (★★★)
(copy of prob 33)
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 ti...
Logarithm with base other than 'e'
The standard log() function in Matlab returns the natural logarithm (base equal to Euler's constant). Compute the logarithm for ...
5年以上 前
解決済み
Find the binary code
Given a sinusoidal signal, create a function that returns the binary code of a quantized value. The function takes the bit lengt...
Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...
5年以上 前
解決済み
Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function.
its an extension...
5年以上 前
解決済み
Pell numbers
Find the nth pell number
<https://en.wikipedia.org/wiki/Pell_number>
5年以上 前
解決済み
Repeat elements of a vector
Repeat each elements of a given vector according to their values.
* x=[1,2,1,3]
* y=[1,2,2,1,3,3,3]
Go back n times
You will be given a column vector (such as x = [1; 2; 3; 4; 5; 6]). If (n=3) you will return following;
[ 1 NaN NaN NaN
...
5年以上 前
解決済み
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...
5年以上 前
解決済み
Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...
5年以上 前
解決済み
King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination.
...
5年以上 前
解決済み
Percentage profit:5: Cumulative Interest
If a bank is giving r% yearly cumulative interest for deposit, how much profit we can get by keeping x amount of money for n mon...