Resuelto


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

2 días hace

Resuelto


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

2 días hace

Resuelto


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

2 días hace

Resuelto


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

2 días hace

Resuelto


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

2 días hace

Resuelto


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

2 días hace

Resuelto


Oh Zero Zero Zero!!!
Hello all, So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...

2 días hace

Resuelto


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

2 días hace

Resuelto


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

2 días hace

Resuelto


Apply Function to Each Field of a Structure Array: Part 2
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

2 días hace

Resuelto


Flexible Anonymous Function
Given a function handle, return a handle to a function that would accept an arbitrary number of inputs, applies the function to ...

2 días hace

Resuelto


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

2 días hace

Resuelto


Apply Function to Each Field of a Structure Array: Part 1
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

2 días hace

Resuelto


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

2 días hace

Resuelto


Handle to an array of functions
Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...

2 días hace

Resuelto


Apply a function array to an array of numbers
It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

2 días hace

Resuelto


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

2 días hace

Resuelto


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

2 días hace

Resuelto


Easy Sequences 28: Sum of Radicals of Integers
The radical of a positive integer is defined as the product of the distinct prime numbers dividing . For example, the distinct ...

2 días hace

Resuelto


Easy Sequences 31: N-N's Sequence
We define the N-N's Sequence, as the series of all positive integers in ascending order and with repetition, wherein any number ...

2 días hace

Resuelto


Easy Sequences 13: Average Speed of Spaceship
A certain alien spaceship is capable of traveling at extremely high velocities and is able to change speed instantaneously. The ...

2 días hace

Resuelto


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

2 días hace

Resuelto


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

2 días hace

Resuelto


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

2 días hace

Resuelto


Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

2 días hace

Resuelto


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

2 días hace

Resuelto


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

2 días hace

Resuelto


Conic equation
A conic of revolution (around the |z| axis) can be defined by the equation s^2 – 2*R*z + (k+1)*z^2 = 0 where |s^2=x^2+y...

2 días hace

Resuelto


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

2 días hace

Resuelto


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

2 días hace

Cargar más