Solved


Word with Highest Frequency
Write a MATLAB function that takes in a string and returns the word with the highest frequency in the string. The function shoul...

16 days ago

Solved


That's not my hat!
There exists a highly secretive hat consortium. Members possess identical hats. The members are invited to a meeting. All of the...

16 days ago

Solved


Generate Hadamard Matrix without using hadamard function
In mathematics, a Hadamard matrix, named after the French mathematician Jacques Hadamard, is a square matrix whose entries are e...

16 days ago

Solved


Carmichael Number
Car michael number is a composite number which satisfy following relation: for all integers which are coprime to . ...

17 days ago

Solved


Given a base n, find the y values less or equal than 100(without 1), such that they will never produce a periodic number if we divide any whole number between some of them
A periodic number depends on the base b where we are working. So, for example the number 2/3 in decimal base is periodic(0.666...

17 days ago

Solved


Project Euler: Problem 14 Longest Collatz sequence
This problem is a hard version of "Problem 42673. Longest Collatz Sequence", because of time limits. <https://ww2.mathworks.cn/...

17 days ago

Solved


All Humans are Created Equal - Pareto Equality
One way or the other two sets of identical types can come out ahead of the other by idea of Pareto equality. Pareto equality bet...

17 days ago

Solved


Spiraling out of control....
Imagine a square with corners at the origin and at (1,1). An interesting spiral can be created by tracing the path of a moving ...

17 days ago

Solved


Possible Opponents Matrix for single-elimination tournament
It's tournament time! Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M...

17 days ago

Solved


Caesar Cipher
Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.

17 days ago

Solved


Find all the indices when a value repetition occurs
Find all the sequences of consecutive repeated numbers in a numeric array, returning the indices where each sequence starts and ...

17 days ago

Solved


Just another norm problem (JANP)
*Task:* Implement a function that takes a square matrix A and returns a nonzero vector yc which minimizes ...

17 days ago

Solved


Implement str2cell
You are given a String that is equivalent to a cell array of scalars or vectors. Transform this String to its equivalent Cell ar...

18 days ago

Solved


Ternary Conditional Operator
Returns one of two expressions depending on a condition. (test) : (expression1) : (expression2) *test:* Any Boolean ex...

18 days ago

Solved


3D indexes
Generalisation in 3 dimensions of the <http://nl.mathworks.com/matlabcentral/cody/problems/43117-2d-indexes Problem 43117. 2D I...

18 days ago

Solved


Sum of two number using (regexp, varargin) comand?
Sum two number a &b and get there result in c using the rexp and varargin comand.

18 days ago

Solved


A stroll on the beach: finding a route round a connected region
You are standing on the beach of an island, which you must explore by walking all the way round its coast. Each step is in one o...

18 days ago

Solved


Determine the average number of rounds for the following game.
Each round a uniformly distributed random number is picked between 0 and 1. The game ends when the sum of the random numbers is ...

18 days ago

Solved


Estimate Pi by Monte Carlo method
We can estimate the value of pi with random number by Monte Carlo method. Suppose we have a square of side length of 1 and a q...

18 days ago

Solved


summation of the reciprocals
Determine the summation of the reciprocals of numbers with length equal to N,in the meanwhile there is a digit K excluded from t...

18 days ago

Solved


Find the centroid of triangle
Imagine that you want to calculate the *centroid* of some _triangles_ given in matrix form. First the coordinates of the vertice...

18 days ago

Solved


Where's Waldo?
Find the string 'Waldo' in the character matrix given and return the indices of where you found him as a 4x2 matrix where the el...

18 days ago

Solved


Six Steps to PCA - Step 2: Covariance
*Previous problems in this series* * <http://www.mathworks.co.uk/matlabcentral/cody/problems/2043-six-steps-to-pca-step-1-cen...

18 days ago

Solved


Give a matrix that matches itself when rotated
Given n and s, return a n-by-n matrix a of integers such that sum(sum(a == rot90(a))) is equal to exactly s. The integer...

18 days ago

Solved


Encoding Google Maps Polylines
This problem is based on the Google Polyline Encoder algorithm. This is how Google Maps encodes a line for display on a map. You...

18 days ago

Solved


Get to a number faster.
If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

18 days ago

Solved


Quine : write a quine in MATLAB
Quine is a type of program whose output matches the source code. See: <https://en.wikipedia.org/wiki/Quine_(computing) Quine in...

18 days ago

Solved


Play Games of Beggar My Neighbor
Beggar my neighbor, as it is most commonly referred to, is a simple deterministic card game. A standard 52 card deck is shuffled...

18 days ago

Load more