Community Profile

Peter Cook

675 total contributions since 2010

B.S. Ch.E., EIT, working as a petroleum engineer.
Professional Interests: fracture and reservoir monitoring, completions, production, microseismic, fiber optics, geostatistics

Contributions in
View by

Creating array from 1.e-20 to 1, with steps 1.e-19, 1.e-18..
logspace(-20,0,21)

3 months ago | 4

| accepted

Can I use Pages and save as an Excel spread sheet to import into matlab?

5 months ago | 0

| accepted

Probability plot HELP!!!
To fit a gaussian contour to your 2d data, you could try <http://www.mathworks.com/help/stats/fitgmdist.html fitgmdist>. To p...

6 months ago | 0

| accepted

How to make 'MinPeakDistance' consider first point close to last point in findpeaks ?
If your signal is periodic, you could try to circshift() the signal a couple times (by say, length(signal)/4 or length(signal)/3...

6 months ago | 0

Question

Find the K most orthogonal vectors in a set of vectors
Hello All, The context of this particular search is a step in tuning a spectral clustering routine a la Ng et al 2002. The pu...

7 months ago | 1 Answers | 0

1

Solved

Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

10 months ago

Solved

Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

1 year ago

Solved

Connect blocks in a model
Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

1 year ago

Solved

THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

1 year ago

Solved

Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

1 year ago

Solved

Next Lower Power of B
Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is less than or equal to _n_. E...

1 year ago

Solved

Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

1 year ago

Solved

Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

1 year ago

Solved

Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

1 year ago

Solved

Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

1 year ago

Solved

Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

1 year ago

Solved

Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

1 year ago

Question

(noob) Matlab Compiler Issue
Hey folks, I am trying to build an m-file (sans GUI) into a standalone application for colleagues to utilize. Unfortunate...

1 year ago | 1 Answers | 0

1

Solved

Generate a Parasitic Number
This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

1 year ago

Solved

Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

1 year ago

Solved

nth Rational Number
Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

1 year ago

Solved

Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

1 year ago

Solved

Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

1 year ago

Solved

Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

1 year ago

Solved

Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

1 year ago

Solved

Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

1 year ago

Solved

N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

1 year ago

Solved

Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

1 year ago

Solved

Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

1 year ago

Solved

Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

1 year ago