Gelöst


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

11 Tage vor

Gelöst


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

11 Tage vor

Gelöst


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

11 Tage vor

Gelöst


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

11 Tage vor

Gelöst


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

11 Tage vor

Gelöst


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

11 Tage vor

Gelöst


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

11 Tage vor

Gelöst


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

11 Tage vor

Gelöst


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

11 Tage vor

Gelöst


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

11 Tage vor

Gelöst


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

11 Tage vor

Gelöst


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

11 Tage vor

Gelöst


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

11 Tage vor

Gelöst


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

11 Tage vor

Gelöst


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

11 Tage vor

Gelöst


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

11 Tage vor

Gelöst


Legend of Zelda - Rupee Count (Item Purchase)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that an arr...

11 Tage vor

Gelöst


Eliminate unnecessary polygon vertices
Suppose you have an n-point polygon represented as an n-by-2 matrix of polygon vertices, P. Assume that the polygon is closed; t...

11 Tage vor

Gelöst


Make a "better" checkerboard matrix
This problem seeks to expand the task in Cody Problem 4 by allowing for the creation of checkerboard matrices that can be rectan...

11 Tage vor

Gelöst


Create 24-bit image containing all possible colors
A 24-bit image is an image where each pixel is represented by three values, which are the red, green, and blue color components,...

11 Tage vor

Gelöst


İmage Series 2 AND
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

11 Tage vor

Gelöst


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

11 Tage vor

Gelöst


Remove white spaces at the end of the input string
Remove all trailing white spaces at the end of the input strings

11 Tage vor

Gelöst


Area-03
There are two circles of equal size are inscribed inside a square. They are tangent to each other. <https://serving.photos.ph...

11 Tage vor

Gelöst


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

11 Tage vor

Gelöst


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

11 Tage vor

Gelöst


Find the coefficient of a number in scientifc notation
Given a non-negative real number N, find the coefficient C and the exponent E of its scientific notation (N = C 10^E). Note that...

11 Tage vor

Gelöst


Check Euler's characteristic on regular polyhedra
Problem statement Given the number of vertices and the number of faces of a given regular polyhedron, compute the number of its...

11 Tage vor

Gelöst


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31,32 ...

11 Tage vor

Mehr laden