Solved


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

6 years ago

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

6 years ago

Solved


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

6 years ago

Solved


Odd row
Create a row 'y' with odd numbers where the potential maximum number is given by 'x' and the space between them by 'm'. The firs...

6 years ago

Solved


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

6 years ago

Solved


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

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

6 years ago

Solved


Find and replace the zero array in a matrix
Find the zero array in the matrix and replace it with average of surrounding (adjacent) arrays. Example: A = 3 ...

6 years ago

Solved


Find names/words that start and end with the same letter.
Find names/words (from a string) that start and end with the same letter. * Case-insensitive. * If a name/word is not at the...

6 years ago

Solved


Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

6 years ago

Solved


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

6 years ago

Solved


Find the coefficient of a number in scientifc notation
Given a non-negative real number N, find the coefficient C and the exponent E of its scientific notation (N = C 10^E). Note that...

6 years ago

Solved


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

6 years ago

Solved


Print the largest eigenvalue of A(500)
Write a function that prints the largest eigenvalue of A(500), without any extraneous output. For a positive integer n, let A...

6 years ago

Solved


Sideways sum
Given natural number calculate its _population count_.

6 years ago

Solved


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

6 years ago

Solved


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

6 years ago

Solved


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

6 years ago

Solved


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

6 years ago

Solved


World Cup 2018 Prediction!
Which team will be the winner?

6 years ago

Solved


DC-DC boost converter
Find the output voltage of a DC-DC boost converter when its input voltage is 12V and the duty cycle ratio is 0.6.

6 years ago

Solved


Modulation index
The amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.

6 years ago

Solved


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

6 years ago

Solved


Leading-zero padding
Write a function that will add leading-zero padding to all numbers in the supplied vector, as necessary, based on the maximum nu...

6 years ago

Solved


Send vector into a struct object
Construct a struct object that contains n fields named a1, a2, ..., an, and has values from a given input vector of length n.

6 years ago

Solved


Explode string
Break a sentence into cell of words

6 years ago

Solved


Return strings encapsulated by braces
Return all substrings that are contained within braces ({}). For example: str = 'x = rho*x{-1} + (1-rho)*y{+1}'; when...

6 years ago

Solved


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0....

6 years ago

Solved


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

6 years ago

Solved


Namespace
Create a set of n variable names 'a_1',...,'a_n' The result should be a column oriented cell array of strings. Example inp...

6 years ago

Load more