Answered

How to change pixels to a different colour with a greyscale image?

Here's a hacky approach that does the job: I = imread('CTimagem.png'); mask = I < 8000; Ired = I; Igreen = I; Iblue = I...

How to change pixels to a different colour with a greyscale image?

Here's a hacky approach that does the job: I = imread('CTimagem.png'); mask = I < 8000; Ired = I; Igreen = I; Iblue = I...

14 days ago | 0

| accepted

Solved

Vector push

Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

27 days ago

Solved

Approximate the cosine function

Without using MATLAB trigonometric functions, calculate the cosine of an argument |x| to a precision of |0.0001| *Hint:* You ...

27 days ago

Solved

Size of this cup?

The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

1 month ago

Solved

Simulate one complete step in the Biham–Middleton–Levine traffic model

The <http://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model Biham–Middleton–Levine traffic model> is ...

1 month ago

Solved

Data Regularization

Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...

1 month ago

Solved

Find the Final State of an Abelian Sandpile

Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

1 month ago

Solved

Fill the Matrix - 2

Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

1 month ago

Solved

Fill the matrix - 1

Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

1 month ago

Solved

Cookie Cutters

Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

1 month ago

Solved

Construct a "diagAdiag" matrix

Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

1 month ago

Solved

Maximum of each diagonal

The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

1 month ago

Solved

Minimum of each diagonal

The well-known <http://www.mathworks.com/help/matlab/ref/min.html min> function can operate along either the rows or the columns...

1 month ago

Solved

Sort rows of a matrix

Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

1 month ago

Solved

Index one element in each vector of an array along a given dimension

Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

1 month ago

Solved

return row and column indices given 2 values which define a range

Inspired by problem <http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice> Inputs: - ...

1 month ago

Solved

compress sequence into intervals

You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

1 month ago

Solved

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

1 month ago

Solved

Largest territory

Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

1 month ago

Solved

expand intervals vol.2

Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

1 month ago

Solved

expand intervals vol.3

This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...

1 month ago

Answered

Setting different properties for some line objects stored in the same handle

You can do this with the old-style set() functions, like this: set(h1([3 5]), 'LineWidth', 2); Or you can use deal(), like thi...

Setting different properties for some line objects stored in the same handle

You can do this with the old-style set() functions, like this: set(h1([3 5]), 'LineWidth', 2); Or you can use deal(), like thi...

1 month ago | 1

Solved

Wheat on a chessboard pt 1

If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

1 month ago

Solved

How many unique Pythagorean triples?

For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

1 month ago

Answered

How can my function work?

First, change Wans to W everywhere, otherwise you are not setting the output variable. Second, your final elseif should be chan...

How can my function work?

First, change Wans to W everywhere, otherwise you are not setting the output variable. Second, your final elseif should be chan...

2 months ago | 0

Solved

Kaggle: Reverse Game of Life - Create Isle prior State

<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Isle Single...

2 months ago

Solved

Kaggle: Reverse Game of Life - Zoo of Stills and Oscillators

<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Reverse Lif...

2 months ago

Solved

Kaggle: Reverse Game of Life - Periods of Oscillators

<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Period of L...

2 months ago

Solved

Kaggle: Reverse Game of Life - Single Move to One Cell Case

<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Single Reve...

2 months ago

Solved

Langston's Ant

The <http://en.wikipedia.org/wiki/Langton%27s_ant Langston's Ant> Challenge is to determine the number of Black squares after K ...

2 months ago