Gelöst


Repeat middle rows and columns of an array
Given an MxN numeric array (A), return an array (B) in which the middle rows and columns have each been repeated once. It may be...

mehr als 7 Jahre vor

Gelöst


Change a specific color in an image
The ability to change colors can be a useful tool in image processing. Given an m x n x 3 array (much like CData in images), fin...

mehr als 7 Jahre vor

Gelöst


Tribute to Ramanujan
The nth taxicab number, denoted as T(n), is defined as the smallest number that can be expressed as a sum of two positive algebr...

mehr als 7 Jahre vor

Gelöst


Path of least resistance - Move all direction
Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

mehr als 7 Jahre vor

Gelöst


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

mehr als 7 Jahre vor

Gelöst


Construct a precedence graph from a code segment
A hypothetical MATLAB code segment containing n lines is given in the form of a cell array. The i-th cell contains the i-th line...

mehr als 7 Jahre vor

Gelöst


Signal Processing Basic - 1. Stretch a signal
Input vector V is a discrete time signal assuming the first sample is sampled at t=0. This signal has to be stretched in time. ...

mehr als 7 Jahre vor

Gelöst


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

mehr als 7 Jahre vor

Gelöst


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

mehr als 7 Jahre vor

Gelöst


all possible subsets of set
Given a vector, return all possible subsets of the vector in a cell array. Properties of basic set theory is assumed to be valid...

mehr als 7 Jahre vor

Gelöst


BLOCK x3 (Version 2)
An extension to problem 2451 ( <https://www.mathworks.com/matlabcentral/cody/problems/2451-block-x3-version-1> ). It is based...

mehr als 7 Jahre vor

Gelöst


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

mehr als 7 Jahre vor

Gelöst


Determine connected components of a graph
Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.

mehr als 7 Jahre vor

Gelöst


FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer). Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...

mehr als 7 Jahre vor

Gelöst


Graph Algorithms - 1 : Length of the largest closed path
An undirected simple graph is given as the form of an adjacency matrix. Find the length of the largest closed path (one that sta...

mehr als 7 Jahre vor

Gelöst


birthday on same day of week
Say, Mr. X's birthday is on 20th July, 2014. It was Sunday. Determine the closest year when his birthday will again be on Sunday...

mehr als 7 Jahre vor

Gelöst


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

mehr als 7 Jahre vor

Gelöst


I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

mehr als 7 Jahre vor

Gelöst


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

mehr als 7 Jahre vor

Gelöst


Graph Algorithms - 2 : Chromatic Number
Chromatic number of a graph is the minimum number of distinct colors required to color all the vertices of the graph such that n...

mehr als 7 Jahre vor

Gelöst


weekday and month
Given a year and a weekday, determine how many months of that year had five of those weekdays. It is kind of easy to find. Ex...

mehr als 7 Jahre vor

Gelöst


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

mehr als 7 Jahre vor

Gelöst


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

mehr als 7 Jahre vor

Gelöst


Convert Hard Drive marketing sizes to actual data sizes
Hard drive sizes are typically marketed using the decimal meaning of prefixes, whereas RAM uses binary meanings. For example: ...

mehr als 7 Jahre vor

Gelöst


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

mehr als 7 Jahre vor

Gelöst


Concatenate matrix into 4 quadrants for given number of iteration
If given a matrix and number, output should be its concatenation like wavelet for given number of iterations. Example a ...

mehr als 7 Jahre vor

Gelöst


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

mehr als 7 Jahre vor

Gelöst


calculate RMS voltage
given peak to peak voltage, calculate rms voltage

mehr als 7 Jahre vor

Gelöst


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

mehr als 7 Jahre vor

Gelöst


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

mehr als 7 Jahre vor

Mehr laden