Resuelto


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

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 8 | 87 solvers

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 8 | 75 solvers

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 7 | 62 solvers

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 8 | 40 solvers

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 9 | 67 solvers

Resuelto


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

casi 10 años hace

Problema


Primes Checker
Given variable inputs Check if they are prime numbers

casi 10 años hace | 8 | 65 solvers

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 8 | 58 solvers

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Cargar más