已解决


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

10 years 前

已解决


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

10 years 前

已解决


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

10 years 前

已解决


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

10 years 前

已解决


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

10 years 前

已解决


Logical operators and arrays: 3-input and truth table
Given 3 inputs (inputA, inputB, inputC), assign threeInputAnd with the truth table outcomes for a 3 variable logical-and operati...

10 years 前

已解决


Smallest and Largest Real Numbers
Complete the function by assigning minReal with the smallest positive double precision floating-point number, and maxReal with t...

10 years 前

已解决


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

10 years 前

已解决


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

10 years 前

已解决


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

10 years 前

已解决


Computing Wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

10 years 前

已解决


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

10 years 前

已解决


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

10 years 前

已解决


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

10 years 前

已解决


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

10 years 前

已解决


Adding an element: Ticker tape
* Add stockPrice to the beginning of row array tickerTape

10 years 前

已解决


Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

10 years 前

已解决


Extracting data: Heart rate (pulse)
The resting heart rate for an average adult is 60 - 100 beats per minute. Assign row array heartExtracted with all values in row...

10 years 前

已解决


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

10 years 前

已解决


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

10 years 前

已解决


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

10 years 前

已解决


Indexing the array: Moving values
Assume sampleReadings always contains three elements. * Shift the array contents one position to the left. * The rightmost ...

10 years 前

已解决


Variable Assignment
Complete the ? part by assigning myExamScore with 100.

10 years 前

已解决


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

10 years 前

已解决


Variable sized row arrays
* Reverse the contents of row array mileMarkers

10 years 前

已解决


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

10 years 前

已解决


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the colon operator. * Transpose countValues to result in...

10 years 前

已解决


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

10 years 前

已解决


Double colon operator: Counting up
* Construct a row array countValues from 1 to endValue, using the double colon operator. Ex: If endValue is 5, countValues s...

10 years 前

已解决


Double colon operator: Counting down
* Construct a row array countValues from startValue to endValue, elements decremented by -2 Ex: If startValue is 10 and end...

10 years 前

加载更多