Gelöst


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

fast 10 Jahre vor

Gelöst


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.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Problem


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

fast 10 Jahre vor | 8 | 87 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

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

fast 10 Jahre vor | 8 | 75 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

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

fast 10 Jahre vor | 7 | 62 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Problem


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

fast 10 Jahre vor | 8 | 40 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Problem


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

fast 10 Jahre vor | 9 | 67 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Problem


Primes Checker
Given variable inputs Check if they are prime numbers

fast 10 Jahre vor | 8 | 65 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

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

fast 10 Jahre vor | 8 | 58 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Mehr laden