A résolu


Find cosine between two given vectors u and v.
Find cosine between two given vectors u and v. Example u = [5 2 0 5 3 0]; v = [3 2 5 1 ...

presque 8 ans il y a

A résolu


Generate a melodic contour string matrix
<http://en.wikipedia.org/wiki/Parsons_code Parsons code> is a surprisingly effective way to identify music by its melodic motion...

presque 8 ans il y a

A résolu


GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

presque 8 ans il y a

A résolu


This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance 'a man a plan a canal panama'...

presque 8 ans il y a

A résolu


pay it forward
Choose a number (integer between 0 and 65535) You will pass this problem if you are the *second* person to choose that same n...

presque 8 ans il y a

A résolu


Words Count: A Cell Array Approach
Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

presque 8 ans il y a

A résolu


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

presque 8 ans il y a

A résolu


square root
Find square root of given number

presque 8 ans il y a

A résolu


Refresh your system of equations
Given square matrix, and solution vector, find the values of the variables Example: xyz = [1 -1 2; 0 2 5; 4 0 -3]; //x-y+2...

presque 8 ans il y a

A résolu


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

presque 8 ans il y a

A résolu


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

presque 8 ans il y a

A résolu


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

presque 8 ans il y a

A résolu


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

presque 8 ans il y a

A résolu


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

presque 8 ans il y a

A résolu


Joules to Megatons of TnT
Given joules, J, make a function that converts to megatons of TNT.

presque 8 ans il y a

A résolu


Check if a string starts with another string
Input s='He was so tired' q='He' Output ans = true

presque 8 ans il y a

A résolu


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

presque 8 ans il y a

A résolu


Integrate Me
Given polynomial, output the integral (with k = 1 for simplicity purposes) Example: input = [2 1] % 2x+1 output = [1 1 1]...

presque 8 ans il y a

A résolu


expand intervals vol.3
This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...

presque 8 ans il y a

A résolu


Concatenate string with cell array of strings
Given a cell array of strings (a), a target string (b), and a target position (ind), return a cell array of strings (c) in which...

presque 8 ans il y a

A résolu


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

presque 8 ans il y a

A résolu


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

presque 8 ans il y a

A résolu


Move if I am Optimus Prime
If the number is a prime, roll out!

presque 8 ans il y a

A résolu


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

presque 8 ans il y a

A résolu


Matrix to 3-Column Matrix
Consider a matrix *A* such as A = [1 2 3 3 4 5 6; 2 3 4 5 6 7 8]; Can you convert this matrix to a three-column ...

presque 8 ans il y a

A résolu


Find the longest match inside two strings
Given two strings, find the longest string which is contained within both strings. e.g. the longest string that is contained ...

presque 8 ans il y a

A résolu


Tridiagonal matrix
Given vectors u and v, make a tri-diagonal symmetric matrix such that u is in the main diagonal and v is below and above diagona...

presque 8 ans il y a

A résolu


String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...

presque 8 ans il y a

A résolu


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

presque 8 ans il y a

A résolu


More Simple String Concatenation
Take the first string input, reverse the order of the string from the end to beginning (i.e. apple becomes elppa), add a space a...

presque 8 ans il y a

Charger plus