Community Profile

photo

Tom Holz


1,299 total contributions since 2012

Contact

Tom Holz's Badges

View all

Contributions in
View by

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

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

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

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

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

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

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

3 days 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: ...

3 days 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) ) =...

3 days ago

Solved


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

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

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

4 days 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_. ...

4 days 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_. ...

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

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

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

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

5 days 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

5 days ago

Solved


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

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

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

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

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

11 days ago

Solved


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

11 days ago

Solved


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

11 days ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. The element values ...

11 days ago

Solved


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

11 days ago

Solved


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

11 days ago

Solved


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

11 days ago

Load more