Solved


Solving Quadratic Equations (Version 2)
Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

12 years ago

Solved


A (wrong) place for everything, and everything in its (wrong) place
You have an equal number of cups and balls, each labelled from one to N. You randomly place one ball in each cup. Determine th...

12 years ago

Solved


Check if it is a square or cube of consecutive numbers
Check whether the element of given row vector is a square or cube of consecutive numbers. For example Input x=[4 27 16 25 ...

12 years ago

Solved


Compute circular convolution
In signal processing, we usually encounter the circular convolution case. Compute it here using the two input sequences (denoted...

12 years ago

Solved


Convert a grayscale image into RGB colour format, preserving data type
In the Image Processing Toolbox, MATLAB provides rgb2gray to convert a 3 channel color image into a 1 channel intensity...

12 years ago

Solved


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

12 years ago

Solved


Have you seen any Spindromes recently?
* Never been to the <http://en.wikipedia.org/wiki/Makemake_(dwarf_planet) dwarf planet makemake> yet? * Assume a new unexplore...

12 years ago

Solved


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

12 years ago

Solved


Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

12 years ago

Solved


Cubic Integer Constrained Solution
Find an integral non-trivial solution (x,y,z ~=0) (x=0 or y=0 or z=0 are trivial) for the cubic equation 987,654,321x + 12...

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

12 years ago

Solved


Fill an array given a sum and array length values
Fill an array with random numbers so that their sum and array length will be equal to the given values as input. Function will ...

12 years ago

Solved


Clear all empty variables from the workspace
I want to clear all empty variables from my workspace. See tests suite.

12 years ago

Solved


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstr...

12 years ago

Solved


return row and column indices given 2 values which define a range
Inspired by problem <http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice> Inputs: - ...

12 years ago

Solved


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

12 years ago

Solved


Net Present Value of a Stream of Cash Flows
Calculate <https://en.wikipedia.org/wiki/Present_value the net present value of a future cash flow> vector given; * future ca...

12 years ago

Solved


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31...

12 years ago

Solved


Letter and word frequency
Here is a task: You’re given a text file. Your first task is to create a variable in MATLAB which will hold the text given to...

12 years ago

Solved


Josephus Survivor
The <http://en.wikipedia.org/wiki/Josephus_problem Josephus Challenge> is to find the position that is the last remaining when e...

12 years ago

Solved


Find the solution of algebraic equation
Find the solution of algebraic equation of the form an*x^n + a(n-1)*x^(n-1) + (an-2)*x^(n-2)+...... a2*x^2 + a1*x^1 + a0 = 0;...

12 years ago

Solved


Polynomial Interpolation
Given a set of measurements of dependent variables in a vector, Y, that vary with one independent variable in a vector, X, calcu...

12 years ago

Solved


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

12 years ago

Solved


Genome decoding
Inspired by a question on the answer forum: You are given a matrix of 8-bit integers which encodes a genome. Each integer can...

12 years ago

Solved


LocateMembership | Membership of Matrix in another matrix
Let a and b be given by a = [ 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 4 0 0 0 ] b = [ 2 1 ...

12 years ago

Solved


How to detect isdeployed inside mex file
how can "DEPLOYED" mode or MATLAB mode can be detected inside a mex file how can I detect inside the mex file whether I'm runni...

12 years ago

Solved


Dispatch and collect
Write a function that dispatches the single argument _x_ to multiple function handles (varargin) and concatenates vertically the...

12 years ago

Solved


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

12 years ago

Solved


Kurchan Square - Evaluation Function
Evaluate a Kurchan square. An NxN square with values 1:N^2. Given a square matrix determine the products of each row, column,...

12 years ago

Solved


Pandigital number n°2 (Inspired by Project Euler 32)
After <http://www.mathworks.com/matlabcentral/cody/problems/2319 Problem 2319>. An n-digit number is pandigital if it makes u...

12 years ago

Load more