Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero?
Clue:
He was the first in the line ...
1年以上 前
解決済み
What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...
1年以上 前
解決済み
Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle.
Example:
[3 4 5] -> 2.5
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
1年以上 前
解決済み
What is the next step in Conway's Life?
Given a matrix A that represents the state of Conway's game of Life at one instant (time t=n), return the matrix B that represen...
Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...
2年弱 前
解決済み
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given number of...
2年弱 前
解決済み
Průměr z výběrového souboru
Napište funkci, která vrátí průměr z hodnot vektoru data. Např data = [1, 2, 3, 4, 5, 6, 7, 8, 9] je prumer = 5.
2年弱 前
解決済み
Maximum value in a matrix
Find the maximum value in the given matrix.
For example, if
A = [1 2 3; 4 7 8; 0 9 1];
then the answer is 9.
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...