Make a vector of prime numbers
Input(n) - length of vector with prime numbers
Output(v) - vector of prime numbers
Example:
* n=1; v=2
* n=3; v=[2 3 5...
Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...
13年弱 前
解決済み
Can I make a right triangle ?
Input(a) - is vector with any amount of values. Interpreted as legths of sides.
Output(b):
* Is true if there are any 3 va...
Implement Solitaire cipher for N long deck.
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cypher>.
Given a starting permutation of numbers [1:...
13年弱 前
解決済み
Vector of numbers divisible by 3
* Input(n) - any integer
* Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0
Examples:
* n=6...
13年弱 前
解決済み
Relative ratio of "1" in binary number
Input(n) is positive integer number
Output(r) is (number of "1" in binary input) / (number of bits).
Example:
* n=0; r=...