Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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.

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Problema


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

casi 8 años hace | 2 | 119 solvers

Resuelto


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

casi 8 años hace

Problema


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

casi 8 años hace | 2 | 169 solvers

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Cargar más