Gelöst


Percentage of zeros in a matrix of only 1s and 0s
Write a function called _zero_stat_ that takes a matrix as an input that only has 0 and 1 elements. The function needs to comput...

4 Monate vor

Gelöst


Outlier number!
Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

4 Monate vor

Gelöst


Areas
Given certain dimensions determine the area of that shape. If given only one value assume its the radius. Use round(x) to round ...

4 Monate vor

Gelöst


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

4 Monate vor

Gelöst


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

4 Monate vor

Gelöst


Repeat string n times - 2
This is the two variable version of <http://www.mathworks.com/matlabcentral/cody/problems/42482-repeat-string-n-times Repeat str...

4 Monate vor

Gelöst


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

4 Monate vor

Gelöst


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

4 Monate vor

Gelöst


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

4 Monate vor

Gelöst


Acid-Base Chemistry: Which side of the reaction is more favorable?
In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided wit...

4 Monate vor

Gelöst


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

4 Monate vor

Gelöst


Distance between two GPS Coordinates
A problem that arises when performing geographically weighted regression is determining the distance between GPS coordinates. GI...

4 Monate vor

Gelöst


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

4 Monate vor

Gelöst


Vector parallel to plane?
Given the coefficients of the equation which defines a plane as follows: ax+by+cz=d, return a boolean indicating whether the 2n...

4 Monate vor

Gelöst


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

4 Monate vor

Gelöst


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

4 Monate vor

Gelöst


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. Slightly harder than it seems like it should be. Exampl...

4 Monate vor

Gelöst


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

4 Monate vor

Gelöst


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

4 Monate vor

Gelöst


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

4 Monate vor

Gelöst


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

4 Monate vor

Gelöst


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

4 Monate vor

Gelöst


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

4 Monate vor

Gelöst


Frugal number
check whether n is a frugal number * a frugal number is a natural number in a given number base that has more digits than the...

4 Monate vor

Gelöst


Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

4 Monate vor

Gelöst


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

4 Monate vor

Gelöst


Generate Tribonacci Sequence
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

4 Monate vor

Gelöst


Generate Pascal's Triangle Matrix
Pascal's triangle is an arrangement of numbers where each value is the sum of the values adjacent to it in the previous row: ...

4 Monate vor

Gelöst


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

4 Monate vor

Gelöst


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

4 Monate vor

Mehr laden