Solved


Cumulative minimum of an array
Find the cumulative minimum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummin.htm...

6 years ago

Solved


Construct a "diagAdiag" matrix
Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

6 years ago

Solved


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

6 years ago

Solved


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

6 years ago

Solved


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

6 years ago

Solved


Angle bisectors
Given 2 direction vectors, calculate the *_two_ (2) normalized angle bisectors* (which are perpendicular between them). Input...

6 years ago

Solved


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

6 years ago

Solved


Block average
Given a matrix, calculate the block average of each disjoint sub-matrix of the same size. Assume that the size of the matrix alo...

6 years ago

Solved


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

6 years ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

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

6 years ago

Solved


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

6 years ago

Solved


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

6 years ago

Solved


Minimum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/min.html min> function can operate along either the rows or the columns...

6 years ago

Solved


Under the sea: Snell's law & total internal reflection
<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

6 years ago

Solved


Data Regularization
Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...

6 years ago

Solved


Find the sines of an isosceles triangle when given its area and height
Find the sines of an isosceles triangle when given its area and height. For example, when A=60 and h=5, the result is [0.3752...

6 years ago

Solved


Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

6 years ago

Solved


Matrix to 3-Column Matrix
Consider a matrix *A* such as A = [1 2 3 3 4 5 6; 2 3 4 5 6 7 8]; Can you convert this matrix to a three-column ...

6 years ago

Solved


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

6 years ago

Solved


Radiation Heat Transfer — View Factors (5)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

6 years ago

Solved


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

6 years ago

Solved


Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...

6 years ago

Solved


Moving Product (Easy)
Given an input array A, write a function *movprod(A,k,dim)* to calculate the moving product over a sliding window of length *k* ...

6 years ago

Solved


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

6 years ago

Solved


Radiation Heat Transfer — View Factors (4)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

6 years ago

Solved


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

6 years ago

Solved


Spherical surface triangulation
Create a triangulation of a spherical surface with approximately-uniform coverage <<http://www.alfnie.com/software/print_sphe...

6 years ago

Solved


Packing oranges - one layer
Help the seller to pack oranges efficiently. How many oranges can be put into a box in one layer without squeezing them? Give...

6 years ago

Solved


Cut an orange
Inspired by problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2175 2175>. A hungry matlab enthusiast has an ora...

6 years ago

Load more