Solved


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

12 years ago

Solved


DNA N-Gram Distribution
Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

12 years ago

Solved


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

12 years ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

12 years ago

Solved


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

12 years ago

Solved


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

12 years ago

Solved


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

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

12 years ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

12 years ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

12 years ago

Solved


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

12 years ago

Solved


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

12 years ago

Solved


Power supply: 230V to 115V
The problem is simple: we have a wall outlet which supplies 230V and an apparatus that requires 115V. Software is always chea...

12 years ago

Solved


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

12 years ago

Solved


Plotting a normal distribution for image colors
Hi everyone, I want to read and image in MATLAB and then plot a normal distribution of the frequency of the colors in that im...

12 years ago

Solved


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

12 years ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

12 years ago

Solved


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

12 years ago

Solved


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence ca...

12 years ago

Problem


Speed of light:Experiment
in 1849, Fizeau set up an experiment to measure the speed of light. The discription of this experiment can be found on wikipedi...

12 years ago | 2 | 55 solvers

Solved


Speed of light:Experiment
in 1849, Fizeau set up an experiment to measure the speed of light. The discription of this experiment can be found on wikipedi...

12 years ago

Solved


how to make the function use a default value when it wait for inputs for too long time ?
My function is using urlread() to get data from the web. however the internet is not so good and now and then there is no intern...

12 years ago

Solved


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

12 years ago

Solved


Make a Plot with Functions
Make a plot and test

12 years ago

Solved


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

12 years ago

Solved


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

12 years ago

Solved


Next Lower Power of B
Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is less than or equal to _n_. E...

12 years ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

12 years ago

Solved


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

12 years ago

Solved


chirp again
rise frequency linearly from 0 to frequency f in 1 second and fs samples, initial amplitude must rise smoothly like an aircraft ...

12 years ago

Load more