Compute Fibonacci Number
Compute the _n_-th Fibonacci Number
f(0) = 0,
f(1) = 1,
f(2) = 1,
f(3) = 2, ...
f(42) = 267914296
5年以上 前
解決済み
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
5年以上 前
解決済み
Make roundn function
Make roundn function using round.
x=0.55555
y=function(x,1)
y=1
y=function(x,2)
y=0.6
y=function(x,3)
...
5年以上 前
解決済み
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.
5年以上 前
解決済み
Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.
5年以上 前
解決済み
Check if sorted
Check if sorted.
Example:
Input x = [1 2 0]
Output y is 0
5年以上 前
解決済み
First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...