已解决


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

4 years 前

已解决


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

4 years 前

已解决


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

4 years 前

已解决


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

4 years 前

已解决


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

4 years 前

已解决


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

4 years 前

已解决


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

4 years 前

已解决


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

4 years 前

已解决


reverse string
input='rama' output='amar'

4 years 前

已解决


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

4 years 前

已解决


Area of a circle
Find the value for area of the circle if diameter is given

4 years 前

已解决


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

4 years 前

已解决


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

4 years 前

已解决


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

4 years 前

已解决


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

4 years 前

已解决


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

4 years 前

已解决


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

4 years 前

已解决


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

4 years 前

已解决


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

4 years 前

已解决


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

4 years 前

已解决


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

4 years 前

已解决


Spherical Volume
Calculate the volume of a sphere.

4 years 前

已解决


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

4 years 前

已解决


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

4 years 前

已解决


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

4 years 前

已解决


square number
Square a number

4 years 前

已解决


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

4 years 前

已解决


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

4 years 前

已解决


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

4 years 前

已解决


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

4 years 前

加载更多