Resuelto


Swap between rows
The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...

2 meses hace

Resuelto


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

2 meses hace

Resuelto


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

3 meses hace

Resuelto


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

3 meses hace

Resuelto


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

3 meses hace

Resuelto


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

3 meses hace

Resuelto


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

3 meses hace

Resuelto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

3 meses hace

Resuelto


Popular Word Game™ Distance
Professor Ned, who holds the Nedowed Chair of Crackpot Mathematics at the University of Nedsburg, has recently discovered the da...

3 meses hace

Resuelto


Leaderboard for the Nedball World Cup
At the upcoming inaugural Nedball World Cup, organizers need to track who is in the lead for the coveted Golden Toeplitz trophy,...

3 meses hace

Resuelto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

3 meses hace

Resuelto


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

3 meses hace

Resuelto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

3 meses hace

Resuelto


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

3 meses hace

Resuelto


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

3 meses hace

Resuelto


Government of the Neds, by the Neds, for the Neds - Distribute the Nedsburg City Councilors
The city of Nedsburg consists of several islands, the number of which changes regularly, due to tectonic forces, shoddy civil en...

3 meses hace

Resuelto


Convert Hexavigesimal to Decimal
NASA (Ned’s Alien-Spying Agency) have made contact with a 13-fingered race from the planet Genai. Naturally, Ned’s shadowy opera...

3 meses hace

Resuelto


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

3 meses hace

Resuelto


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

3 meses hace

Resuelto


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

3 meses hace

Resuelto


Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...

3 meses hace

Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

3 meses hace

Resuelto


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The values of B are in the same order a...

3 meses hace

Resuelto


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

3 meses hace

Resuelto


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

3 meses hace

Resuelto


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

3 meses hace

Resuelto


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

3 meses hace

Resuelto


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

3 meses hace

Resuelto


Convert radians to degrees
Given input in radians, output to degrees

3 meses hace

Resuelto


radius of a spherical planet
You just measured its surface area, that is the input.

3 meses hace

Cargar más