Solved

Perl 4: unshift

_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

mer än 4 år ago

Solved

concatenate the elements

you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

mer än 4 år ago

Solved

Parse string and identify specific string sequence in algebraic equation

Given a string S that defines an algebraic expression such as: S= 'X= A1 + A2*(Y1 + A3*Y3)*exp( A4*Y12 + Y1) ;' return a...

mer än 4 år ago

Solved

Nonuniform quantizer as a piecewise constant function

Implement a nonuniform quantizer as the following piecewise function: y = -3.5, x < -3 y = -1.5, -3 ≤ x < -1 y = ...

mer än 4 år ago

Solved

JOIN STRINGS

There are two given strings 'STRING1' and 'STR ING2'.|monospaced|The output should be 'STRING1 STR ING2' or STr1='Sum';STr2='EQU...

mer än 4 år ago

Solved

Generate binary combinations for a given number of bit(s)

Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

mer än 4 år ago

Solved

Convert a vector of Integers into a matrix of binaries

Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

mer än 4 år ago

Solved

Sum Rows

Sum the same indexed (unique) rows. Examine the test suite. Related Challenge - <http://www.mathworks.com/matlabcentral/cody/...

mer än 4 år ago

Solved

capable husband?

* The prospective husband must pass a background check, * and *functions* faithfully, as suggested by <http://www.mathworks.com...

mer än 4 år ago

Solved

Reverse CHECKBOX MATRIX with 69

Create a reverse checkbox matrix with '69'. Where the size is the input and output will be a square checkbox matrix. Exa...

mer än 4 år ago

Solved

Find the position of last minimum value in an integer array with numbers

If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

mer än 4 år 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...

mer än 4 år ago

Solved

Minimum possible M of the maximum side of a triangle of given area A.

Suppose a triangle has area A. Suppose it has three sides S1, S2, and S3. Suppose M = max([S1 S2 S3]). What is the minimum po...

mer än 4 år ago

Solved

Calories in a slice of pizza?

The total calories C in a pizza is printed on its box. You know the angle A (degrees) of the slice you placed on your plate. Ple...

mer än 4 år ago

Solved

Given a number N, find the smallest prime P>N

Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

mer än 4 år ago

Solved

Check if any duplicates in your data

Given an array x, return a number n equal to the largest number of repetitions in your data. For example: If x=[1 2 3 6 8 4 9]...

mer än 4 år ago

Solved

Cody Computer Part 2 - Get the license number of Cody Computer

In the Cody computer investigation party, you may have already solved : <http://www.mathworks.com/matlabcentral/cody/problems...

mer än 4 år ago

Solved

Consecutive Powers

Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

mer än 4 år ago

Solved

Create matrix with Gray code

Output "g" should be a matrix of class double, with <http://en.wikipedia.org/wiki/Gray_code Gray reflected binary code>. Inpu...

mer än 4 år ago

Solved

generate a matrix of Legendre polynomials

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

mer än 4 år 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...

mer än 4 år ago

Solved

There are 10 types of people in the world

Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

mer än 4 år ago

Solved

You LOVES Matlab 41%

Given two strings, determine the percentage that one loves the other in the following way: YOU LOVES MATLAB there is 1 '...

mer än 4 år ago

Solved

Volume of Cylinder

Compute the Circumference of a Cylinder given it's radius and height.Here x is the radius and y is the height

mer än 4 år ago

Solved

Create a matrix from a cell

In this problem , you must convert a cell into a matrix and pad each cell with NaN. *Example 1:* If you have the input...

mer än 4 år ago

Solved

Cody Computer Part 1 - Guess the system font used by uipanel

list = listfonts return the list of available system fonts. Can you guess which font is used for uipanel on the CODY computer...

mer än 4 år ago

Solved

Subtract two positive numbers

Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

mer än 4 år ago

Solved

Project Euler: Problem 16, Sums of Digits of Powers of Two

2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

mer än 4 år ago

Solved

Pluralization

Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

mer än 4 år ago