已解决


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

11 years 前

已解决


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

11 years 前

已解决


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

11 years 前

已解决


Compute next 1000-day birthday milestone
Given a birthdate in DD-MMM-YYYY format, compute the next 1000-day birthday milestone. For example, Abraham Lincoln was born on ...

11 years 前

已解决


Phoneword Translator
Given an alphanumeric telephone number (Ex. 1-800-COLLECT), return the purely numeric phone number as a vector. This problem use...

11 years 前

已解决


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

11 years 前

已解决


Partial sorting algorithm
Return the top k elements of an input vector. A comparison function compareFcn(m,n) is provided to compare individual elements o...

11 years 前

已解决


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

11 years 前

已解决


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

11 years 前

已解决


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

11 years 前

已解决


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

11 years 前

已解决


Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...

11 years 前

已解决


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

11 years 前

已解决


Lychrel Number Test (Inspired by Project Euler Problem 55)
The task for this problem is to create a function that takes a number _n_ and tests if it might be a Lychrel number. This is, re...

11 years 前

已解决


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

11 years 前

已解决


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

11 years 前

已解决


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

11 years 前

已解决


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

11 years 前

已解决


Create array of all Distances between two Sets of Points : No Neural Network Toolbox
This Challenge is a subsection of <http://www.mathworks.com/matlabcentral/cody/problems/1110-usc-fall-2012-acm-martian-pranks Ma...

11 years 前

已解决


Visualization of experimental data across a surface
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...

11 years 前

已解决


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

11 years 前

已解决


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

11 years 前

已解决


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

11 years 前

已解决


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

11 years 前

已解决


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

11 years 前

已解决


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

11 years 前

已解决


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

11 years 前

已解决


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

11 years 前

已解决


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

11 years 前

已解决


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

11 years 前

加载更多