Solved


Divisible by 4
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

2 years ago

Solved


Palindrome Checker
Check to see if a given string is a palindrome (a word, phrase, or sequence that reads the same backward as forward). Output sh...

2 years ago

Solved


Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar) *Hint: a formula exists!

2 years ago

Solved


Diagonal Product of A Square Matrix
For a matrix A, calculate the product of its diagonal elements. * Assume all input matrices are square & corresponding element...

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

2 years ago

Solved


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

2 years ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

2 years ago

Solved


Handle to an array of functions
Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...

2 years ago

Solved


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

2 years ago

Solved


Get ranks of values in a vector
For a given vector, say [6 3 8 2], return the ranks (ascending) of observations, i.e. [3 2 4 1]. Do not worry about tied ranks. ...

2 years ago

Solved


Apply a function array to an array of numbers
It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

2 years ago

Solved


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

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


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

2 years ago

Solved


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

2 years ago

Solved


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

2 years ago

Solved


Indirect Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

2 years ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

2 years ago

Solved


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

2 years ago

Solved


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

2 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

2 years ago

Solved


Determine the length of a string of characters
Determine the length of a string of characters

2 years ago

Solved


Create vector as shown in test cases
Create vector as shown in test cases

2 years ago

Solved


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

2 years ago

Solved


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

2 years ago

Solved


Corresponding ASCII code.
Given the number, the output will show the corresponding ASCII code.

2 years ago

Solved


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

2 years ago

Solved


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4]

2 years ago

Solved


Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

2 years ago

Solved


Find remainder when x is divided by 3
Find remainder when x is divided by 3

2 years ago

Load more