A résolu


Given a number find two variables
If the input is *x*, find *a* and *b* from the following equation: *x = a*2^b*. Hint: *b* is an integer while *x* and *a* ar...

environ 12 ans il y a

A résolu


Measure a Special Distance
Given an n-by-2 matrix with positive and negative numbers, return an n-by-n matrix in the manner of the function template.

environ 12 ans il y a

A résolu


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

environ 12 ans il y a

A résolu


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

environ 12 ans il y a

A résolu


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

environ 12 ans il y a

A résolu


Sum of the pixel values for the blue color
Calculate the sum of the pixel values for the blue color, with a picture as an input. *NOTE:* The picture will be provided as...

environ 12 ans il y a

A résolu


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

environ 12 ans il y a

A résolu


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

environ 12 ans il y a

A résolu


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

environ 12 ans il y a

A résolu


Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements. Input should be element's position and output shou...

environ 12 ans il y a

A résolu


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

environ 12 ans il y a

A résolu


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

environ 12 ans il y a

A résolu


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

environ 12 ans il y a

A résolu


Test within tolerance
Given a vector of experimental data, D, and a vector of truth data, T, return FALSE if any +/- errors (D-T) are outside a given ...

environ 12 ans il y a

A résolu


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

environ 12 ans il y a

A résolu


Largest Prime Number
Given a matrix X, find the largest prime number in X.

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

environ 12 ans il y a

A résolu


Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

environ 12 ans il y a

A résolu


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

environ 12 ans il y a

A résolu


Determine the length of a string of characters
Determine the length of a string of characters

environ 12 ans il y a

A résolu


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

environ 12 ans il y a

A résolu


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

environ 12 ans il y a

A résolu


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

environ 12 ans il y a

A résolu


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

environ 12 ans il y a

A résolu


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

environ 12 ans il y a

A résolu


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

environ 12 ans il y a

A résolu


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

environ 12 ans il y a

Charger plus