문제를 풀었습니다


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

거의 10년 전

문제를 풀었습니다


Function call in expression: Reduced pricing.
Write a single statement that assigns cartTotal with the discounted cost of items 1 and 2. Function DiscountedPrice will return ...

거의 10년 전

문제를 풀었습니다


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년 전

문제를 풀었습니다


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

거의 10년 전

문제를 풀었습니다


Element-wise division
* Assign row array weightKilo with the corresponding weight in kilograms. Use the following conversion: kg = lb / 2.2

거의 10년 전

문제를 풀었습니다


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년 전

문제를 풀었습니다


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

거의 10년 전

문제를 풀었습니다


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

거의 10년 전

문제를 풀었습니다


Indexing the last element: Print queue
* Delete the last element of row array printQueue.

거의 10년 전

문제를 풀었습니다


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

거의 10년 전

문제를 풀었습니다


Arithmetic array operations
* Add x to each element of array temperatureReadings.

거의 10년 전

문제를 풀었습니다


Indexing an array element
* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

거의 10년 전

문제를 풀었습니다


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

거의 10년 전

문제를 풀었습니다


give nth decimal place of pi
max 15th place after the decimal point is ok for now

거의 10년 전

문제를 풀었습니다


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

거의 10년 전

문제를 풀었습니다


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

거의 10년 전

문제를 풀었습니다


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

거의 10년 전

문제를 풀었습니다


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

거의 10년 전

문제를 풀었습니다


Multi-line comments
* Fix the syntax errors.

거의 10년 전

문제를 풀었습니다


Coordinate geometry
Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

거의 10년 전

문제를 풀었습니다


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

거의 10년 전

문제를 풀었습니다


Find max
Find the maximum value of a given vector or matrix.

거의 10년 전

문제를 풀었습니다


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

거의 10년 전

문제를 풀었습니다


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년 전

문제를 풀었습니다


Write an expression
Assigns finalResult with firstSample plus secondSample, squared, then divided by 3. Ex: If firstSample is 18 and secondSample is...

거의 10년 전

문제를 풀었습니다


Population growth
Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The fi...

거의 10년 전

문제를 풀었습니다


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

거의 10년 전

문제를 풀었습니다


Declaring a character
* Assign middleInitial with the character T.

거의 10년 전

문제를 풀었습니다


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

거의 10년 전

문제를 풀었습니다


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

거의 10년 전

더 보기