Solved


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

9 days ago

Solved


count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v...

9 days ago

Solved


Toolbox check part 3
In my ongoing quest to highlight obscure parts of MATLAB, the latest challenge is to take 2 string inputs, one a MATLAB toolbox ...

10 days ago

Solved


polar inertia
given locations of a set of unit masses on complex plane, find polar moment of inerta about the origin. for example output 4 if ...

10 days ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

10 days ago

Solved


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should be a...

10 days ago

Solved


What is the next step in Conway's Life?
Given a matrix A that represents the state of Conway's game of Life at one instant (time t=n), return the matrix B that represen...

12 days ago

Solved


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

12 days ago

Solved


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

13 days ago

Solved


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

13 days ago

Solved


Set a Soroban Abacus
*Description* This problem is the inverse of <http://www.mathworks.com/matlabcentral/cody/problems/136-read-a-soroban-abacus ...

13 days ago

Solved


Read a Soroban Abacus
*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

13 days ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

16 days ago

Solved


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

17 days ago

Solved


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

2 years ago

Solved


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

2 years ago

Solved


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

2 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

2 years ago

Solved


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cornelius...

2 years ago

Solved


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

2 years ago

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

2 years ago

Solved


Maintain shape of logical-index mask
When using logical indexing into an array, MATLAB returns a vector output. For example, if A = magic(3); mask = logi...

2 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

2 years ago

Solved


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

2 years ago

Solved


Pythagorean perfect squares: find the square of the hypotenuse and the length of the other side
Given the square root of a square number, *seed*, and a range, *n*, find the square number, *Z* as well as the other side, *y*, ...

2 years ago

Solved


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

2 years ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

2 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

2 years ago

Solved


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

2 years ago

Solved


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

2 years ago

Load more