Risolto


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

10 mesi fa

Risolto


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

10 mesi fa

Risolto


Find vampire numbers
A vampire number is a number v that is the product of two numbers x and y such that the following conditions are satisfied: at ...

10 mesi 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] ...

10 mesi fa

Risolto


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

10 mesi fa

Risolto


Hankelize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/42501-toeplitize-a-matrix Problem 42501. Toeplitize a matrix>, ...

10 mesi fa

Risolto


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

10 mesi fa

Risolto


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

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

10 mesi fa

Risolto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

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

10 mesi fa

Risolto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

10 mesi fa

Risolto


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

10 mesi fa

Risolto


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

10 mesi fa

Risolto


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

10 mesi fa

Risolto


Convert a number to its Roman representation
Convert a given number to its Roman representation. For example, if the number is 98, it should display 'XCVIII'

10 mesi fa

Risolto


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

10 mesi fa

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

10 mesi fa

Risolto


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

10 mesi fa

Risolto


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

10 mesi fa

Risolto


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

10 mesi 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 count...

10 mesi fa

Risolto


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

10 mesi fa

Risolto


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

10 mesi fa

Risolto


Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

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

10 mesi fa

Risolto


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

10 mesi fa

Risolto


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

10 mesi fa

Risolto


String Logic 11
Examples: 'SUNDAY' --> 6 'MONDAY' --> 6 'TUESDAY' --> 7 'WEDNESDAY' --> 9 'THURSDAY' --> 8 'FRIDAY' --> 5 'SATURDAY' --...

10 mesi fa

Risolto


String Logic 14
Examples: 'DIG' --> 'HRN' 'KIMBALL' --> 'VRZDBXX' 'DEAL' --> 'HJBX' 'LIMB' --> 'XRZD' 'MADE' --> 'ZBHJ' 'CHEF' --> 'FPJL'

10 mesi fa

Carica altro