A résolu


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

plus de 3 ans il y a

A résolu


How to multiply?
* Imagine you are in 3012 Anno Domini, when everyone must learn how to multiply, * and competing for the highly prestigious pos...

plus de 3 ans il y a

A résolu


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

plus de 3 ans il y a

A résolu


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

plus de 3 ans il y a

A résolu


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

plus de 3 ans il y a

A résolu


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

plus de 3 ans il y a

A résolu


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

plus de 3 ans il y a

A résolu


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

plus de 3 ans il y a

A résolu


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

plus de 3 ans il y a

A résolu


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

plus de 3 ans il y a

A résolu


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

plus de 3 ans il y a

A résolu


Be happy
check whether the given number is happy in b-base. * A happy number can be defined as a number which will yield 1 when it is ...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

plus de 3 ans il y a

A résolu


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

plus de 3 ans il y a

A résolu


generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

plus de 3 ans il y a

A résolu


check whether a number is a pentatope number
<https://oeis.org/A000332>

plus de 3 ans il y a

A résolu


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

plus de 3 ans il y a

A résolu


Bell Triangle
Form the bell triangle upto nth bell number posotion; * if n=5 * y= [1 0 0 0 0; 1 2 0 0...

plus de 3 ans il y a

A résolu


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

plus de 3 ans il y a

Charger plus