Solved


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

13 years ago

Solved


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

13 years ago

Solved


Special Relativity 101.
Special relativity states that the mass of an object varies as a function of its velocity. If *c* is the speed of light (c appro...

13 years ago

Solved


Equal to their cube
Tell me three real numbers that are equal to their cubes?

13 years ago

Solved


yet another flying fly (YAFF)
Same as the previous problem <http://www.mathworks.com/matlabcentral/cody/problems/203-fly-fly-away fly fly away> but now with *...

13 years ago

Solved


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

13 years ago

Solved


Create a Video
Create an avi video of the function surf(sin(2*pi*k/20)*Z,Z) for k=1:100 with an avi "quality" of 5. The standard quality is ...

13 years ago

Solved


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

13 years ago

Solved


Vector Linear sum: (p1-m1)V1+(p2-m2)V2+...(pK-mk)Vk
Calculate the sum of a Vector times coefficients expressed as two strings. Example: Normal representation [ a b c ], [ p1 ...

13 years ago

Solved


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

13 years ago

Solved


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

13 years ago

Solved


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

13 years ago

Solved


dir with recursive subdirectory search
Write a function that performs a recursive file search. The input and output format can be identical to the dir function. The ...

13 years ago

Solved


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

13 years ago

Solved


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

13 years ago

Solved


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

13 years ago

Solved


Calculate Alcohol By Volume with Original and Final Gravity
Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

13 years ago

Solved


compare strings
Given 2 strings and 3 actions (Insert,delete,replace) on characters. Find the difference between two strings. Example: str...

13 years ago

Solved


Mann-Kendall Correlation
Write a function that returns the <http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient Mann-Kendall> correlati...

13 years ago

Solved


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

13 years ago

Solved


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

13 years ago

Solved


A different counting method
Given an array (x) of integers, the "counting" array (y) is showing the number of identical consecutive integers in x in front o...

13 years ago

Solved


Rescaling vector
Rescale the entries of a vector x so that it spams [a,b]. The new values should be linearly stretched into the new range. _Ex...

13 years ago

Solved


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

13 years ago

Solved


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

13 years ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

13 years ago

Solved


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

13 years ago

Solved


How long do each of the stages of the rocket take to burn?
A space rocket has 3 stages: - stage 1, s1; - stage 2, s2; - stage 3, s3. If s1 burns 3 x as long as s2 which burns ...

13 years ago

Solved


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

13 years ago

Solved


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

13 years ago

Load more