Solved


Matrix game: Winner takes all
Given a matrix A, return a new matrix of the same size in which the biggest element of each column in A takes 1, and 0 for all t...

9 years ago

Solved


Extract part elements of matrix into one new matrix
Given a matrix that includes different nonzero and zero entries, extract the nonzero elements and form a new matrix. The new mat...

9 years ago

Solved


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

9 years ago

Solved


Determinants
Given a square matrix(A), find the determinant(d). For example: A = [1,3;4,5] d = 1*5-4*3 = -7

9 years ago

Solved


number of groups
In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

9 years ago

Solved


Is matlab fun?
Returns 'yes' no matter the input.

9 years ago

Solved


Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix. examples: Input A=[1 2 3 5 6;52 58 56 45...

9 years ago

Solved


How many hours are there in a day in Italy?
Remember "European Summer Time"

9 years ago

Solved


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

9 years ago

Solved


Under the sea: Snell's law & total internal reflection
<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

9 years ago

Solved


Dots in a Diamond
Return how many <http://en.wikipedia.org/wiki/Diamond_cubic Diamond Cubic> lattice grid points there are inside a 3D sphere of r...

9 years ago

Solved


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

9 years ago

Solved


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

9 years ago

Solved


Frequency Analysis of Text
Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

9 years ago

Solved


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

9 years ago

Solved


Write a function to calculate step size delta if bits per sample and input range is given for quantization.
numBit = bits per sample; range = input max value - min value; delta = step size; l = number of levels;

9 years ago

Solved


Percentage profit:2
If you are selling at x dollar, you are facing r1% profit; what will be the selling price for making r2% profit?

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

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

9 years ago

Solved


Matrix Manipulation
Given an m*n matrix, see if a matrix contains any 0s in any row. if it contains 0 anywhere in any particular row, delete that ro...

9 years ago

Solved


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

9 years ago

Solved


Percentage profit
If you are buying at x dollar, what will be the selling price for making the r% profit?

9 years ago

Solved


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

9 years ago

Solved


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

9 years ago

Solved


Determine if a four bar mechanism is of Grashof type
A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

9 years ago

Solved


Create a New_Word
The output of the function is a new word created from the word entered into the function. The new word is created by deleting th...

9 years ago

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

9 years ago

Solved


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

9 years ago

Solved


Can the given sides form a triangle?
Can the three given sides form a triangle?

9 years ago

Solved


No more zeros
Given an array with zeros at the beginning or at the end, you should get the output without these zeros: input = [zeros(5...

9 years ago

Load more