Solved


Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with ...

11 years ago

Solved


Find the biggest digit in a matrix
Write a function to find the biggest digit in a matrix; input -> a matrix output -> a digit For example; [12; 47;...

11 years ago

Solved


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

11 years ago

Solved


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

11 years ago

Solved


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

11 years ago

Solved


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

11 years ago

Solved


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator.

11 years ago

Solved


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

11 years ago

Solved


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample within thresholdValue.

11 years ago

Solved


Relational operators and row arrays: Overweight baggage
* Assign overweightBaggage with true wherever baggageWeight is above maximumWeight

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.

11 years ago

Solved


Find out rank of Matrix
Find out rank of Matrix without use of matlab function.

11 years ago

Solved


Sideways sum
Given natural number calculate its _population count_.

11 years ago

Solved


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


Logic array: Identifying qualifying times
Create a logic array qualifyingIndex with true for any location where the runner is male with a running time less than 8.2. Row ...

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


Find out DC Gain of transfer function
Find out DC Gain of transfer function Example, G(s)=5/ (s+2), then DC gain is 2.5 (put s=0)

11 years ago

Solved


Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of $) for the 7 days of a week, starting with...

11 years ago

Solved


Logical indexing: Player scores
Player 1 and player 2 take turns playing a game. Row array gameScores contains the scores of player 1, then player 2, then playe...

11 years ago

Solved


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


Indexing the array: Moving values
* Write three statements to shift the array contents 1 position to the left. * The rightmost element should be assigned -1.

11 years ago

Solved


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

11 years ago

Load more