A résolu


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

environ 4 ans il y a

A résolu


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

environ 4 ans il y a

A résolu


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

environ 4 ans il y a

A résolu


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

environ 4 ans il y a

A résolu


Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

environ 4 ans il y a

A résolu


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

environ 4 ans il y a

A résolu


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

environ 4 ans il y a

A résolu


Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...

environ 4 ans il y a

A résolu


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

environ 4 ans il y a

A résolu


Relative points in 2D: problem 2
The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A la...

environ 4 ans il y a

A résolu


Relative points in 2D: problem 1
The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A lan...

environ 4 ans il y a

A résolu


Relative pose in 2D: problem 2
We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a...

environ 4 ans il y a

A résolu


Relative pose in 2D: problem 1
We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a...

environ 4 ans il y a

A résolu


Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

environ 4 ans il y a

A résolu


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

environ 4 ans il y a

A résolu


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

environ 4 ans il y a

A résolu


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

environ 4 ans il y a

A résolu


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

environ 4 ans il y a

A résolu


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

environ 4 ans il y a

A résolu


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

environ 4 ans il y a

A résolu


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

environ 4 ans il y a

A résolu


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

environ 4 ans il y a

A résolu


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

environ 4 ans il y a

A résolu


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x&#8321;_ + _x&#8322;_ = 2 _x&#8321;...

environ 4 ans il y a

A résolu


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

environ 4 ans il y a

A résolu


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

environ 4 ans il y a

A résolu


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

environ 4 ans il y a

A résolu


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

environ 4 ans il y a

A résolu


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

environ 4 ans il y a

A résolu


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

environ 4 ans il y a

Charger plus