Risolto

Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

quasi 2 anni fa

Risolto

A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

quasi 2 anni fa

Risolto

Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

quasi 2 anni fa

Risolto

Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

quasi 2 anni fa

Risolto

Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

quasi 2 anni fa

Risolto

Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

quasi 2 anni fa

Risolto

frame of the matrix
Given the matrix M, return M without the external frame.

quasi 2 anni fa

Risolto

What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

quasi 2 anni fa

Risolto

Game of life - 01
Refer to <https://en.wikipedia.org/wiki/Conway's_Game_of_Life> given a set of cells (the initial state) represented by 1(l...

quasi 2 anni fa

Risolto

subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

quasi 2 anni fa

Risolto

MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

quasi 2 anni fa

Risolto

Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

quasi 2 anni fa

Risolto

matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

quasi 2 anni fa

Risolto

Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

quasi 2 anni fa

Risolto

prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

quasi 2 anni fa

Risolto

Divisors

quasi 2 anni fa

Risolto

Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

quasi 2 anni fa

Risolto

Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

quasi 2 anni fa

Risolto

Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

quasi 2 anni fa

Risolto

*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

quasi 2 anni fa

Risolto

Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

quasi 2 anni fa

Risolto

Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

quasi 2 anni fa

Risolto

Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

quasi 2 anni fa

Risolto

Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

quasi 2 anni fa

Risolto

Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

quasi 2 anni fa

Risolto

Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

quasi 2 anni fa

Risolto

Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

quasi 2 anni fa

Risolto

Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

quasi 2 anni fa

Risolto

Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...

quasi 2 anni fa

Risolto

MATLAB Basic: rounding IV