已解决


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

21 days 前

已解决


Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

21 days 前

已解决


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

21 days 前

已解决


Use of regexp
Given a string, containing several sentences, such as: 'I played piano. John played football. Anita went home. Are you safe?...

2 months 前

已解决


Bang Bang in Bangalore
Imagine a strange language disorder, Bangolangosis, has developed among trigonometricians of <http://en.wikipedia.org/wiki/Banga...

2 months 前

已解决


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

2 months 前

已解决


Space Saver
Remove all characters that are below a space in ASCII value.

2 months 前

已解决


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

5 months 前

已解决


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

5 months 前

已解决


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

5 months 前

已解决


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

5 months 前

已解决


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

5 months 前

已解决


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

5 months 前

已解决


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

5 months 前

已解决


Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

5 months 前

已解决


Swap between first and last column
The idea is to swap between first and last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 ...

5 months 前

已解决


Swap between rows
The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...

5 months 前

已解决


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

5 months 前

已解决


area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

5 months 前

已解决


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

5 months 前

已解决


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

5 months 前

已解决


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

5 months 前

已解决


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

5 months 前

已解决


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

5 months 前

已解决


Spherical Volume
Calculate the volume of a sphere.

5 months 前

已解决


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

5 months 前

已解决


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

5 months 前

已解决


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

5 months 前

已回答
Change order of Area and Constantline in the same plot
Your line is behind the area. Your alpha value is making the area see through, so you can see the line. If you change alpha to 1...

5 months 前 | 1

| 已接受

已解决


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

5 months 前

加载更多