Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is
720 = 1 * 2 * 3 * 4* 5 *6
Thus 6 factorial = factorial(720)....
4年以上 前
解決済み
Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n.
Example
For n = 2
then sum of squares = 5 (1^2 + ...
4年以上 前
解決済み
Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.
4年以上 前
解決済み
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
4年以上 前
解決済み
Square a Number
Given an input x, return y, which is equal to the square of x.
4年以上 前
解決済み
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
4年以上 前
解決済み
Frobenius Norm
Write your own version of Frobenius Norm without using the 'norm' function.
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector of numbers, output a square array with the...
4年以上 前
解決済み
0<=x<=pi?
Check whether the given angle is between zero and pi.
Return logical true or false.
Radiation Heat Transfer — View Factors (2)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...
4年以上 前
解決済み
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
4年以上 前
解決済み
Calculating Ring Area
In two-dimensional space, a ring can be constructed by using two concentric circles. Determine the area of a ring which has r1 ...