A résolu


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

presque 8 ans il y a

A résolu


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

presque 8 ans il y a

A résolu


Clock Solitaire
Many card players will be familiar with the game of <http://en.wikipedia.org/wiki/Clock_patience Clock Solitaire>. Briefly, th...

presque 8 ans il y a

A résolu


Diagonal of a Spiral Matrix
Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

presque 8 ans il y a

A résolu


How to Concatenate two strings?
How to Concatenate two strings?

presque 8 ans il y a

A résolu


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

presque 8 ans il y a

A résolu


Words Count: A String Array Approach
Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

presque 8 ans il y a

A résolu


Combine the first and last names
MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...

presque 8 ans il y a

A résolu


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

presque 8 ans il y a

A résolu


Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

presque 8 ans il y a

A résolu


Find the Pattern
Find the pattern between input and output. Write a function that gives the correct output for any input. *Hint: magic*

presque 8 ans il y a

A résolu


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

presque 8 ans il y a

A résolu


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

presque 8 ans il y a

A résolu


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

presque 8 ans il y a

A résolu


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

presque 8 ans il y a

A résolu


Penny Distribution Machine
A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

presque 8 ans il y a

A résolu


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

presque 8 ans il y a

A résolu


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

presque 8 ans il y a

A résolu


007: Chinese Barrack Invasion
*MISSION:* Successfully invade a military barrack located in China. *WARNING:* There is a row of _n_ security switches protec...

presque 8 ans il y a

A résolu


Sort Reversal
There are n index cards in a row, with n distinct integers written on them (one number per card) so that the numbers are sorted ...

presque 8 ans il y a

A résolu


Toads and Frogs Puzzle 2
On a two-dimensional board with 2n + 1 rows and 2n + 1 columns, all (2n + 1)^2 positions of the board, except the central one, a...

presque 8 ans il y a

A résolu


Toads and Frogs Puzzle
On a one-dimensional board with n + m + 1 cells, there are n counters in the first n cells representing Toads and m counters in ...

presque 8 ans il y a

A résolu


Connect 4 (the boardgame)
You are playing the popular game "Connect 4" ( <https://en.wikipedia.org/wiki/Connect_Four>) against Matlab. Luckily, Matlab isn...

presque 8 ans il y a

Problème


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

presque 8 ans il y a | 2 | 119 solveurs

A résolu


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

presque 8 ans il y a

Problème


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

presque 8 ans il y a | 2 | 169 solveurs

A résolu


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

presque 8 ans il y a

A résolu


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

presque 8 ans il y a

A résolu


Raise each element to the power of its index in a matrix
In a matrix, A = [1,2;3,4] raise the power of each element like: 1^1+2^3+3^2+4^4 and add it all to produce the result 274

presque 8 ans il y a

A résolu


The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...

presque 8 ans il y a

Charger plus