Solved


Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

9 years ago

Solved


While loop with multiple conditions
Write a while loop that multiplies userValue by 2 while userValue is not 10 and while userValue is less than 25.

9 years ago

Solved


While loop with branching
Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, th...

9 years ago

Problem


Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

9 years ago | 8 | 85 solvers

Solved


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

9 years ago

Solved


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

9 years ago

Solved


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

9 years ago

Solved


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

9 years ago

Problem


Add Me To Death (Sum sum sum)
Given certain vector, sum of the input vector, get the sum of 2 adjacent numbers in the input, and sum of the output vector (wh...

9 years ago | 8 | 73 solvers

Solved


Double summation
Write two nested for loops to calculate the following double summation: <<https://drive.google.com/uc?id=0B74PAULDIwwsWFhlNTV...

9 years ago

Solved


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

9 years ago

Solved


Bae Slap Counter LOL XD
How many times did your bae had slapped you? Create a formula counts how many times you are slapped

9 years ago

Solved


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

9 years ago

Solved


Modify an array's elements
Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. ...

9 years ago

Solved


Modify an array's elements using other elements
Write a for loop that sets each array element in bonusScores to the sum of itself and the next element, except for the last elem...

9 years ago

Solved


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

9 years ago

Problem


Max Sum That You Can Get Of 2 Numbers given variable input
Given variable input length,combine 2 numbers from and output maximum sum the combinations can generate Example x = 3; y = 5;...

9 years ago | 7 | 60 solvers

Solved


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

9 years ago

Solved


Writing a nested function: BMI calculation
Write a nested function CalculateBMI that assigns bmiValue given a user's weight and height. Use the following equations to calc...

9 years ago

Solved


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

9 years ago

Problem


Move if I am Optimus Prime
If the number is a prime, roll out!

9 years ago | 8 | 38 solvers

Solved


Moving target
Write a function with persistent variables currentLocationX and currentLocationY that store an object's location. Each call to t...

9 years ago

Problem


Recursion at variable input
input of any length a =2 b =2 c =3 output = (a^b)^c = 64

9 years ago | 9 | 66 solvers

Solved


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

9 years ago

Problem


Primes Checker
Given variable inputs Check if they are prime numbers

9 years ago | 8 | 63 solvers

Solved


Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

9 years ago

Problem


Combine the digits to output numbers
input could be of any length e.g. 1. in1 = 1 in2 = 2 output = 12 2. in1 = 2 in2 = 1 in3 = 0 output = 210

9 years ago | 8 | 57 solvers

Solved


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

9 years ago

Solved


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

9 years ago

Solved


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

9 years ago

Load more