Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

ongeveer 6 jaar ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

ongeveer 6 jaar ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

ongeveer 6 jaar ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

ongeveer 6 jaar ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

ongeveer 6 jaar ago

Solved


Negative matrix
Change the sign of all elements in given matrix.

ongeveer 6 jaar ago

Solved


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

ongeveer 6 jaar ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

ongeveer 6 jaar ago

Problem


determine the sum of fraction part for given matrix
determine the sum of fraction part for given matrix a=1.8308 8.9172 6.7537 1.5853 10.2858 5.3804 6.5497 ...

ongeveer 6 jaar ago | 2 | 37 solvers

Solved


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

ongeveer 6 jaar ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

ongeveer 6 jaar ago

Problem


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

ongeveer 6 jaar ago | 1 | 23 solvers

Solved


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

ongeveer 6 jaar ago

Solved


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

ongeveer 6 jaar ago

Problem


Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

ongeveer 6 jaar ago | 1 | 18 solvers

Solved


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

ongeveer 6 jaar ago

Solved


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

ongeveer 6 jaar ago

Solved


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

ongeveer 6 jaar ago

Solved


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

ongeveer 6 jaar ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

ongeveer 6 jaar ago

Solved


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

ongeveer 6 jaar ago

Solved


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

ongeveer 6 jaar ago

Solved


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

ongeveer 6 jaar ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

ongeveer 6 jaar ago

Solved


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

ongeveer 6 jaar ago

Solved


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

ongeveer 6 jaar ago

Solved


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

ongeveer 6 jaar ago

Solved


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

ongeveer 6 jaar ago

Solved


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

ongeveer 6 jaar ago

Solved


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

ongeveer 6 jaar ago

Load more