Solved

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

5 months ago

Solved

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

5 months ago

Solved

only input
Return the output without writing any code into the function.

5 months ago

Solved

Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

5 months ago

Solved

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

5 months ago

Solved

Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

5 months ago

Solved

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.

5 months ago

Solved

De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

5 months ago

Solved

Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

5 months ago

Solved

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

5 months ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

5 months ago

Solved

Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

5 months ago

Solved

Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

5 months ago

Solved

Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

5 months ago

Solved

Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

5 months ago

Solved

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

5 months ago

Solved

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

5 months ago

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.

5 months ago

Solved

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

5 months ago

Solved

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

5 months ago

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

5 months ago

Solved

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

5 months ago

Solved

Given a and b, return the sum a+b in c.

5 months ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

5 months ago

Solved

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

5 months ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

5 months ago