Solved


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

ongeveer 11 jaar ago

Solved


Guess the Coefficients!
Given a polynomial _p_ known to have positive integer coefficients, deduce the values of the coefficients. For example: ...

ongeveer 11 jaar ago

Solved


Map all the indices of an Array Indices into a Vector giving Index vs Row and Column
Create an array of the row and column values for the indices of an array. This is typically performed using [r c]=ind2sub(siz...

ongeveer 11 jaar ago

Solved


swap sign sum & multiply castles
* It is an easy problem, if you know the answer. * Given a square matrix of NxN ordinary numbers. * Initially place N identi...

ongeveer 11 jaar ago

Solved


2D - Mean Filter
Assume you are given an "image" matrix of size NxM. Reduce the image noise by implementing a mean filter window of size 9 (a 3x3...

ongeveer 11 jaar ago

Solved


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value, and each off-diagonal element replaced b...

ongeveer 11 jaar ago

Solved


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

ongeveer 11 jaar ago

Solved


Geometry: Find Circle given 3 Non-Colinear Points
*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

ongeveer 11 jaar ago

Solved


FizzBuzz
<http://c2.com/cgi/wiki?FizzBuzzTest FizzBuzz Test> The "Fizz-Buzz test" is an interview question designed to help filter out...

ongeveer 11 jaar ago

Solved


Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1...

ongeveer 11 jaar ago

Solved


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

ongeveer 11 jaar ago

Solved


count any radix?
given radix r(2-9), digts d(1-4), give all possible strings in sorted order. for example, if r=2, d=2, then output {'00' '01' '1...

ongeveer 11 jaar ago

Solved


Function Sniffer
* Given a string, * find out which built-in functions are present, * output a simple string, * that has sorted and unique ...

ongeveer 11 jaar ago

Solved


Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...

ongeveer 11 jaar ago

Solved


McCabe Complexity
The Challenge is to return the McCabe complexity for various functions. One way to determine the McCabe Complexity is to use ...

ongeveer 11 jaar ago

Solved


Create a Cell array of month-end date strings within a provided date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

ongeveer 11 jaar ago

Solved


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

ongeveer 11 jaar ago

Solved


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

ongeveer 11 jaar ago

Solved


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

ongeveer 11 jaar ago

Solved


Finite Continued Fraction
Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. F...

ongeveer 11 jaar ago

Solved


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

ongeveer 11 jaar ago

Solved


What is Title of Cody Challenge 42?
Given a Cody Challenge number return its Title. *Input:* Cody Challenge Number *Output:* Title of the Cody Challenge ...

ongeveer 11 jaar ago

Solved


magic solver
Create a function that returns _true_ and has a cody <http://www.mathworks.com/matlabcentral/cody/problems/256-return-the-size-o...

ongeveer 11 jaar ago

Solved


Aufbau principle
Given the order e=[1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p], find a vector x with these condi...

ongeveer 11 jaar ago

Solved


Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference. ex ...

ongeveer 11 jaar ago

Solved


Now!
I said now!

ongeveer 11 jaar ago

Solved


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string |inStr| from a list of strings |strLi...

ongeveer 11 jaar ago

Solved


Miles to go before I sleep
Recently, my car's odometer passed 56789. Given an odometer reading, output how many miles need to be driven to get the next mi...

ongeveer 11 jaar ago

Solved


Determine value using Look-up table method
Given a set of 2 vectors x and y related in a certain way, you are supposed to find value of y (ydash) given a particular value ...

ongeveer 11 jaar ago

Solved


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

ongeveer 11 jaar ago

Load more