Solved


Book Club
A book club that has _K_ members, as a group, have to read _N_ books. Return how many different ways the members could read the ...

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

11 years ago

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

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

11 years ago

Solved


Cost computation and Display
Given a positive number of pens, a cost is computed and displayed. One Pen costs 1.99 dollars

11 years ago

Solved


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

11 years ago

Solved


Chebyshev polynomials of the 2nd Kind
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Chebyshev_polynomials Chebyshev polynomial of the...

11 years ago

Solved


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

11 years ago

Solved


N-th digit of Pi
Give the N-th digits of Pi Input = 1 => Output = '1' Input = 1:10 => Output = '1415926535' Input = [11:15 25:35] => Out...

11 years ago

Answered
How do i get index of a closest value from an array?
Try something like this: divisor = 900; how_close_is = abs(mod(a+divisor/2,divisor)-divisor/2); index_chunk=find(how_...

11 years ago | 0

Solved


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

11 years ago

Solved


Square a Number
Given an input x, return y, which is equal to the square of x.

11 years ago

Solved


Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...

11 years ago

Solved


Get the array of sum for three consecutive numbers in an array
Get the array of sum, for three consecutive numbers in an array. if Input 'x' does not have at-least 3 elements then 'y' shou...

11 years ago

Solved


Create an array (n,n) where only diagonal elements are '1' and others are '0'
Create an array (n,n) where only diagonal elements are '1' and others are '0' EX: n = 3; then Resultant array would be [ 1 0...

11 years ago

Solved


Divisible by n, prime divisors - 11, 13, 17, & 19
Divisibility checks against prime numbers can all be accomplished with the same routine, applied recursively, consisting of add ...

11 years ago

Solved


Divisible by n, prime divisors (including powers)
For this problem, you will be provided an array of numbers (not necessarily in order). Return the array of numbers with only pri...

11 years ago

Solved


Divisible by n, prime vs. composite divisors
In general, there are two types of divisibility checks; the first involves composite divisors and the second prime divisors, inc...

11 years ago

Solved


Make a function that returns its own character count
Write a function that returns a 128 element vector with an accurate inventory of the ASCII characters in its own function file. ...

11 years ago

Solved


Find the area!
Find the area of a medium Dominos pizza

11 years ago

Solved


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

11 years ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

11 years ago

Solved


Array
Create a 3 by 3 array of 1s

11 years ago

Solved


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

11 years ago

Solved


Find the realtion between x and y
x=1 then y=3, x=2 then y=7, x=3 then y=13,

11 years ago

Solved


Define the operators of function_handles
Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...

11 years ago

Solved


Converter temp 0 to 200 degree C to 4 to 20mA
Converter temp 0 to 200 degree C to 4 to 20mA (It is used in transmitter)

11 years ago

Solved


Add two hex numbers
Add two hex numbers

11 years ago

Solved


calculate Simple Interest
SI=(principal*time*rate)/100

11 years ago

Solved


Megan's walk
Can you make <http://www.mathworks.com/matlabcentral/fileexchange/51139-megan-simulator--xkcd- Megan> (a stick-figure model of t...

11 years ago

Load more