Risolto


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

3 mesi fa

Risolto


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

3 mesi fa

Risolto


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 mesi fa

Risolto


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 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


"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) ...]...

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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.

4 mesi fa

Risolto


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

4 mesi fa

Risolto


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

4 mesi fa

Carica altro