Community Profile

# Stefan

### Delft University of Technology

224 total contributions since 2012

View details...

Contributions in
View by

Solved

Connect blocks in a model
Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

3 years ago

Solved

Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

3 years ago

Solved

Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

4 years ago

Solved

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

4 years ago

Solved

pressure to dB?
given x ratio of pressure, find corresponding y dB

4 years ago

Solved

Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

4 years ago

Solved

Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

4 years ago

Solved

Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

4 years ago

Solved

counting for loop
Complete the function below using a for loop to count from 3 to N by 2. For example, if N is 10, count 3, 5, 7, 9 and stop. Fo...

4 years ago

Solved

If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

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

4 years ago

Solved

Solving Quadratic Equations (Version 2)
Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

4 years ago

Solved

Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

4 years ago

Solved

Max of a Vector
Write a function to return the max of a vector

4 years ago

Solved

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

4 years ago

Solved

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

4 years ago

Solved

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

4 years ago

Solved

Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...

4 years ago

Solved

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

4 years ago

Solved

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

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

4 years ago

Solved

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

4 years ago

Solved

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

4 years ago

Solved

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

4 years ago

Solved

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

4 years ago

Solved

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

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

4 years ago

Solved

Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in attendanceV...

4 years ago

Solved

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

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

4 years ago