Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...
9年以上 前
解決済み
calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter).
You should get pi without using the pi function in M...
9年以上 前
解決済み
Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...
0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as
f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...
9年以上 前
解決済み
Increment up an input vector
Increment up an input vector by adding the indices to the vector values. For example, if an input vector is [3, 2, 6, 1, 6], the...
metre to feet converter
The idea is to make a converter, which exchange meters to feets.
We use a factor of 1m = 3.281*1f.
so 3m are equals to 9.843 m...