Risolto


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

circa 5 anni fa

Risolto


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

circa 5 anni fa

Risolto


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

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

circa 5 anni fa

Risolto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

circa 5 anni fa

Risolto


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

circa 5 anni fa

Risolto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

circa 5 anni fa

Risolto


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

circa 5 anni fa

Risolto


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

circa 5 anni fa

Risolto


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

circa 5 anni fa

Risolto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

circa 5 anni fa

Risolto


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

circa 5 anni fa

Risolto


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

circa 5 anni fa

Risolto


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

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

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

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

circa 5 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

circa 5 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

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

circa 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

circa 5 anni fa

Risolto


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

circa 5 anni fa

Risolto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

circa 5 anni fa

Risolto


Easy problem
This is an easy problem. Just click on submit.

circa 5 anni fa

Risolto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

circa 5 anni fa

Risolto


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

circa 5 anni fa

Risolto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

circa 5 anni fa

Carica altro