Risolto


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

17 giorni fa

Risolto


Return area of square
Side of square=input=a Area=output=b

17 giorni fa

Risolto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

17 giorni fa

Risolto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

17 giorni fa

Risolto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

17 giorni fa

Risolto


Create a vector
Create a vector from 0 to n by intervals of 2.

17 giorni fa

Risolto


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

17 giorni fa

Risolto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

17 giorni fa

Risolto


Find max
Find the maximum value of a given vector or matrix.

17 giorni fa

Risolto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

17 giorni fa

Risolto


Inner product of two vectors
Find the inner product of two vectors.

17 giorni fa

Risolto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

17 giorni fa

Risolto


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

17 giorni fa

Risolto


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

17 giorni fa

Risolto


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

17 giorni fa

Risolto


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

17 giorni fa

Risolto


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

17 giorni fa

Risolto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

17 giorni fa

Risolto


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

17 giorni fa

Risolto


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

17 giorni fa

Risolto


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

17 giorni fa

Risolto


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

17 giorni fa

Risolto


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

17 giorni fa

Risolto


Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. #1 s1 = [...

17 giorni fa

Risolto


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

17 giorni fa

Risolto


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

17 giorni fa

Risolto


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

17 giorni fa

Risolto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

17 giorni fa

Risolto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

17 giorni fa

Risolto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

17 giorni fa

Carica altro