A résolu


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

plus de 5 ans il y a

A résolu


pay it forward
Choose a number (integer between 0 and 65535) You will pass this problem if you are the *second* person to choose that same n...

plus de 5 ans il y a

A résolu


Area-01
Given the radius of the circle inscribed in a square, find the area that is not bounded by the circle but inside the square. ...

plus de 5 ans il y a

A résolu


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

plus de 5 ans il y a

A résolu


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

plus de 5 ans il y a

A résolu


Dice face matrix!
This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

plus de 5 ans il y a

A résolu


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

plus de 5 ans il y a

A résolu


Find same numbers touching each other...
So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples: x...

plus de 5 ans il y a

A résolu


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

plus de 5 ans il y a

A résolu


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

plus de 5 ans il y a

A résolu


Find the mean of a 2-D matrix after excluding elements of specified sub-matrix
You need to find the mean of a 2-D matrix after excluding elements which form an inner sub-matrix. e.g. If the input 2-D matrix ...

plus de 5 ans il y a

A résolu


Cube root of max value in a vector
Find the cube root of the maximum value in a vector

plus de 5 ans il y a

A résolu


Number Power
Raise a number to itself.

plus de 5 ans il y a

A résolu


Find the smallest prime with n inside

plus de 5 ans il y a

A résolu


Area under standard normal curve

plus de 5 ans il y a

A résolu


Create an array from 1 to x in steps of 1.

plus de 5 ans il y a

A résolu


Circle : Square

plus de 5 ans il y a

A résolu


Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

plus de 5 ans il y a

A résolu


Go back n times
You will be given a column vector (such as x = [1; 2; 3; 4; 5; 6]). If (n=3) you will return following; [ 1 NaN NaN NaN ...

plus de 5 ans il y a

A résolu


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

plus de 5 ans il y a

A résolu


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Percentage profit
If you are buying at x dollar, what will be the selling price for making the r% profit?

plus de 5 ans il y a

A résolu


Orthogonal lines
Check whether two given lines are orthogonal or not. Two lines are orthogonal if they create a right angle at their intersect...

plus de 5 ans il y a

A résolu


Accessing value of variable whose name is stored in another variable as string.
Accessing value of variable whose name is stored in another variable as string. for example: var1=n; var2='var1'; %Assigning...

plus de 5 ans il y a

A résolu


given number is power of n or not?
Check weather The input is power of n or not? for example x=8,n=2 --> true x=6,n=2 --> false

plus de 5 ans il y a

A résolu


Cannibal eating odd and even numbered men
There are N men in a queue. A cannibal eats either all odd-numbered or all even-numbered men in the queue at a time. In the fi...

plus de 5 ans il y a

A résolu


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

plus de 5 ans il y a

A résolu


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

plus de 5 ans il y a

A résolu


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

plus de 5 ans il y a

Charger plus