Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


square root
Find square root of given number

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Cargar más