started with 3 cookies and you never ate any how many are left

Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

lb to kilogram
convert lb to kilogram units, easy

Ounces to Kilograms
convert ounces to kilograms, easy

Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

Please check if calorie intake is less than 300 kcal.
I like eating some puddings and some chocolate cookies around 3 o'clock. However, I care about calorie intake. Please check whe...

Calculate the volume of the cube.
Example n = 3; a=volume(n); a = 27

Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

Replace Nan!
Replace Nan in the given vector(v) with 9999.

5年以上 前

Sum of self power series
The series, 1^1,2^2,3^3,4^4,.... Find the sum of such series when x terms are given.

5年以上 前

Rotate it!
Given a set of points, your aim is to rotate it by a given angle "theta" CCW (in 2d). The points are given in a matrix(x) of dim...

5年以上 前

Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

5年以上 前

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...

5年以上 前

Check availability of a number in an array
An array is given A=[1 2 3 4 5 7 8 9 10]. Find whether the number n is present in given array or not. If the number n is prese...

5年以上 前

raise 1/3
Raise a number to 1/3 power.

5年以上 前

Speed of car travelling x meters in y seconds
What is the speed of a car if the car travelled x meters in y seconds? Supply the answer in m/s.

5年以上 前

Area of square
Find the area of a square whose diagonal length is given as x.

5年以上 前

Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

5年以上 前

Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

5年以上 前

Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

5年以上 前

Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

6年弱 前

Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

6年弱 前

Calculate square and cube of number
Calculate square and cube of number x

6年弱 前

Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

6年弱 前

Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

6年弱 前

Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

6年弱 前

Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

6年弱 前

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...

6年弱 前

Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

6年弱 前

Geometric Series
Given x and n, give the sum of x ^ 1 to x ^ n. You should not have to use a loop for this.

6年弱 前