Problema


Dots in a Sphere
Return how many integer grid points there are inside a 3D sphere of radius _r_ centred at (0,0,0) (including points on the edge)...

quasi 13 anni fa | 1 | 65 risolutori

Risolto


Dots in a Sphere
Return how many integer grid points there are inside a 3D sphere of radius _r_ centred at (0,0,0) (including points on the edge)...

quasi 13 anni fa

Risolto


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

quasi 13 anni fa

Risolto


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

quasi 13 anni fa

Risolto


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

quasi 13 anni fa

Risolto


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

quasi 13 anni fa

Risolto


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

quasi 13 anni fa

Risolto


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

quasi 13 anni fa

Risolto


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

quasi 13 anni fa

Risolto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

quasi 13 anni fa

Risolto


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

quasi 13 anni fa

Risolto


Triangular Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Triangular_tiling Triangular Tiling> grid points there are inside a circle of radi...

quasi 13 anni fa

Problema


Triangular Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Triangular_tiling Triangular Tiling> grid points there are inside a circle of radi...

quasi 13 anni fa | 0 | 32 risolutori

Risolto


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

quasi 13 anni fa

Risolto


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

quasi 13 anni fa

Risolto


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

quasi 13 anni fa

Risolto


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

quasi 13 anni fa

Risolto


Double Deal
*Description* Given an input vector _v_, return the first element as the first output, the second element as the second outpu...

quasi 13 anni fa

Risolto


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

quasi 13 anni fa

Risolto


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

quasi 13 anni fa

Risolto


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

quasi 13 anni fa

Risolto


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

quasi 13 anni 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...

quasi 13 anni fa

Risolto


root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...

quasi 13 anni fa

Risolto


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

quasi 13 anni fa

Risolto


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

quasi 13 anni fa

Risolto


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

quasi 13 anni fa

Risolto


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

quasi 13 anni fa

Risolto


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

quasi 13 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 13 anni fa

Carica altro