Solved


Basics: counting digits of a number irrespective of the sign
publish the number of digits in any input integer example: -23---->2

2 månader ago

Solved


Calculate triangle area
Imagine that you want to calculate the areas of some triangles given in matrix form. First the coordinates of the vertices of th...

2 månader ago

Solved


Where is she?
Given the numbers 12, 3, 6, 9 Tell where the girl is located. That is: Look to your 3 o'clock = look right Example ...

2 månader ago

Solved


Surface area of a sphere
Given the radius of a sphere, find it's Surface area

2 månader ago

Solved


Find parts of a circle.
Given radius (r) of a circle find the diameter (d), circumference (c), an area (a).

2 månader ago

Solved


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

2 månader ago

Solved


Magnitude with vargin
Return the magnitude (square root of the sum of the squares) for an undefined number of input arguments.

2 månader ago

Solved


Squares in Squares - Concentric Squares
Given a number, n, create an n x n sized matrix with concentric squares of 1s from the outside in. There should be a gap between...

2 månader ago

Solved


Square Patterns in a square matrix

2 månader ago

Solved


Spiral Out - 01
Create a spiral matrix ( clock-wise direction ) of size n. Try to do that without using the built-in function.

2 månader ago

Solved


Sub-sequence - 01
Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...

2 månader ago

Solved


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

2 månader ago

Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

2 månader ago

Solved


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

2 månader ago

Solved


Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

2 månader ago

Solved


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

2 månader ago

Solved


Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

2 månader ago

Solved


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

2 månader ago

Solved


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

2 månader ago

Solved


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

2 månader ago

Solved


determine the sum of decimal part for given matrix
determine the sum of fraction part for the given matrix

2 månader ago

Solved


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

2 månader ago

Solved


Divisible by n, prime divisors from 20 to 200
Pursuant to the previous problem (linked below), this problem requires a function that checks for divisibility of large numbers ...

2 månader ago

Solved


Divisible by n, Composite Divisors
Pursuant to <http://www.mathworks.com/matlabcentral/cody/problems/42453-divisible-by-n-prime-vs-composite-divisors Divisible by ...

2 månader ago

Solved


Divisible by n, Truncated-number Divisors
Some divisors only require a few numbers at the end of the number in question to determine divisibility, no matter how long. Exa...

2 månader ago

Solved


Leader
An element of a list is called a "leader" if every element to its right (and not just the one immediately to its right) is stric...

2 månader ago

Solved


That's some divisor you've got there...
Given a positive integer x, calculate the sum of all of the divisors of the number. Please include the number itself in your fi...

2 månader ago

Solved


Repeat middle rows and columns of an array
Given an MxN numeric array (A), return an array (B) in which the middle rows and columns have each been repeated once. It may be...

2 månader ago

Solved


Component area
Find the area of the component below, all measurements are in mm <<https://image.ibb.co/hocruF/Component.png>>

2 månader ago

Load more