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

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

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

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

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

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

7 Tage ago

Solved

counting groups!

This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

10 Tage ago

Solved

Three...is a magic number.

Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

10 Tage ago

Solved

expand intervals

You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

10 Tage ago

Solved

How unique?

Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

10 Tage ago

Solved

Higher! Lower!

My kids have started to play the "I'm thinking of a number between X and Y" game in the car on trips to and from their swim less...

10 Tage ago

Solved

What is the nth step in Conway's Life?

Based on <Problem 52. What is the next step in Conway's Life?> Generalize your solution to Problem 52 - Give the state of the...

11 Tage ago

Solved

Find out next state (NS) of T Flip-Flop.

Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

11 Tage ago

Solved

Find the next state of a JK Flip-Flop

Find the next state (NS) of a JK Flip-Flop based on previous state (PS), inputs. Learn more about JK Flip-Flop theory here: ...

11 Tage ago

Solved

Find the starting index of a consecutive condition

Given a logical vector |v|, and a positive integer |n|, return the smallest index |i| that satisfies: all( v(i : i+n-1) ) =...

11 Tage ago

Solved

Hamiltonian Cycle

This is related to the Travelling Salesman Problem <http://www.mathworks.com/matlabcentral/cody/problems/1339 1339> created by...

11 Tage ago

Solved

Track Logic

A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker whi...

11 Tage ago

Solved

Knave in the middle attack

This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles, mixed w...

11 Tage ago

Solved

Knights and Knaves (part 3)

_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> _logical puzzles_. ...

12 Tage ago

Solved

Knights and Knaves (part 2)

_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> _logical puzzles_. ...

12 Tage ago

Solved

Knights and Knaves (part 1)

This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles. You ...

12 Tage ago

Solved

Divisible by 8

Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

12 Tage ago

Solved

Tridiagonal

Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

12 Tage ago

Solved

"Find out the best cricket"

This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

12 Tage ago

Solved

Gamma Function

Evaluate the <http://en.wikipedia.org/wiki/Gamma_function/ Gamma Function>. Gamma_val(0) = Inf Gamma_val(1.2) = 0.9182

12 Tage ago

Solved

Convert decimal to hex as shown in test cases

Convert decimal to hex as shown in test cases.

12 Tage ago

Solved

Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.

Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

12 Tage ago

Solved

Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.

--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

12 Tage ago

Solved

Find MPG of Lightest Cars

The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

18 Tage ago

Solved

Rescale Scores

Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

18 Tage ago