Solved


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.

10 years ago

Solved


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

10 years ago

Solved


the function, the box of boxer briefs, being twice the amount being manufactured twice as much x
return y as the function multiplied by x twice

10 years ago

Solved


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

10 years ago

Solved


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

10 years ago

Solved


Check if integer
Given a vector of elements, determine if each element is an integer and return true or false accordingly.

10 years ago

Solved


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

10 years ago

Solved


times 5
Given the variable x as your input, multiply it by five and put the result in y.

10 years ago

Solved


Sum Even Numbers
Given a number x, make the summation of all the even until x. For instance, x = 7, so y = 2+4+6 = 12 * x = [3] * y = 2 * ...

10 years ago

Solved


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

10 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

10 years ago

Solved


Times 32
X is given as your variable. Y is your output multiplied by 32 Example x=1 y=1x32=32

10 years ago

Solved


Find the square root of a value
Given the variable x as your input, find the square root and let the result be represented by y Examples: Input x = 4 O...

10 years ago

Solved


Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

10 years ago

Solved


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

10 years ago

Solved


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

10 years ago

Solved


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

10 years ago

Solved


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

10 years ago

Solved


sum of the first 10 odd numbers
y = sum(first_10_odd_numbers)

10 years ago

Solved


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

10 years ago

Solved


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

10 years ago

Solved


Alkane
Given a number, x, that is equal to the number of carbons in an alkane, find, y, the number of hydrogens in the alkane.

10 years ago

Solved


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

10 years ago

Solved


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

10 years ago

Solved


Sum of integers numbers
Sum of the numbers from 1 to 100

10 years ago

Solved


square number
Square a number

10 years ago

Solved


y equals x divided by 2
function y = x/2

10 years ago

Solved


Create a random integer vector to 100
Create a random integer vector to 100, with one output. Example randi(r, z) Ans. 54

10 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

10 years ago

Solved


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

10 years ago

Load more