Solved


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

2 months ago

Solved


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

2 months ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

2 months ago

Solved


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

2 months ago

Solved


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

2 months ago

Solved


Wrap-around effect
In vector x of length n we define (n+1) position as going back to the first position (so called wrap-around effect). Can you ret...

2 months ago

Solved


Non trivial identities - reshape
Return x by reshaping it.

2 months ago

Solved


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

2 months ago

Solved


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

2 months ago

Solved


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

2 months ago

Solved


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

2 months ago

Solved


Gaussian elimination
Get the Gussian elimination of the Matrix Given You cannot use built-in Matlab functions triu :)

2 months ago

Solved


Remove collinear points in a set of 2D points defining a polygon
Consider a polygon that is obtained by joining a set of 2D points whose coordinates are stored in matrix P=[x,y]. Write a functi...

2 months ago

Solved


How many figures currently exist?
Return the number of figures that exist at any given time.

2 months ago

Solved


Get factory-defined property values
Given a property name (e.g. 'AxesUnits', 'LineMarkerSize', 'UicontrolBackgroundColor'), return the factory-defined value for tha...

2 months ago

Solved


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and iterate until the sum of the digits is a single-digit number. Example: Inp...

2 months ago

Solved


Convert a vector to a lower triangular matrix
I now have a row vector and I want to convert it to a lower trilangular matrix. The rows of the lower trilangular matrix have t...

2 months ago

Solved


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

2 months ago

Solved


Repeat the entries of the vector to their reference times in the vector.
e.g for input x: [ 7 3 9 5] output y: [ 7 3 3 9 9 9 5 5 5 5]

2 months ago

Solved


Find unique number in input
Find value that occurs in odd number of input elements.

2 months ago

Solved


Roots of a quadratic equation.
Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.

2 months ago

Solved


Determine the roots of a cubic equation
Given the coefficients a, b, c, and d of a cubic equation, a*x^3 + b*x^2 + c*x + d = 0, determine its roots.

2 months ago

Solved


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

2 months ago

Solved


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

2 months ago

Solved


Project Euler: Problem 14, Longest Collatz sequence
The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) U...

2 months ago

Solved


Should Mr McNugget even get out of bed today?
As we learned in <http://www.mathworks.com/matlabcentral/cody/problems/42888-frobenius-mcnugget-factorization an earlier problem...

2 months ago

Solved


Frobenius McNugget Factorization
Mr. Frobenius McNugget is a peculiar man. As you might expect, he likes to eat Chicken McNuggets. But his love of number theo...

2 months ago

Solved


Cellular Automaton | Rule X
Cellular Automata (CA) provide a convenient way to represent many kinds of systems in which the values of cells (either 0 or 1) ...

2 months ago

Solved


Convert nested struct-array to numeric array
Sometimes data happens to be nicely structured in a struct-array, distributed over various levels of the struct, according to th...

2 months ago

Solved


Return the sequence element III
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42832-segmented-number-sequence Problem 42832>....

2 months ago

Load more