Risolto


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value, and each off-diagonal element replaced b...

oltre 11 anni fa

Risolto


Pi Estimate 2
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation2.pdf>

oltre 11 anni fa

Risolto


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

oltre 11 anni fa

Risolto


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

oltre 11 anni fa

Risolto


Better Index Number
Let's say you want to save many, many files and append these files with a certain sortable index number. As you probably know, y...

oltre 11 anni fa

Risolto


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

oltre 11 anni fa

Risolto


Find the index of the first occurrence of a value in a matrix
Given a matrix of scalars, find the first occurrence of -1 in each column. Output NaN for a column which does not contain the va...

oltre 11 anni fa

Risolto


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

oltre 11 anni fa

Risolto


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

oltre 11 anni fa

Risolto


Determine connected components of a graph
Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.

oltre 11 anni fa

Risolto


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

oltre 11 anni fa

Risolto


Fermat's last theorem - again
For a given integer n, express it as a sum of two squares if possible. Return empty matrix otherwise. Solution may not be unique...

oltre 11 anni fa

Risolto


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

oltre 11 anni fa

Risolto


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

oltre 11 anni fa

Risolto


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

oltre 11 anni fa

Risolto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

oltre 11 anni fa

Risolto


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

oltre 11 anni fa

Risolto


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

oltre 11 anni fa

Risolto


I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

oltre 11 anni fa

Risolto


Tony's trick for duplicating an mx1 vector n times
Without using repmat, or for loop, or concatenation, create a function to duplicate a vector, v, a specified number of times, n....

oltre 11 anni 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...

oltre 11 anni fa

Risolto


Palindrome numbers
Find the palindrome numbers from 1 to n where n is the number entered by the user.

oltre 11 anni fa

Risolto


How many solutions has this problem?
Guess, predict or calculate :-) (You will be scored by the accuracy). Update: <http://www.mathworks.co.uk/matlabcent...

oltre 11 anni fa

Risolto


Open coded lock.
Guess the <hint://fliplr(anchortext) password> or break the <2314/solutions/new#test_suite_body lock>.

oltre 11 anni fa

Risolto


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

oltre 11 anni fa

Risolto


Pandigital number n°2 (Inspired by Project Euler 32)
After <http://www.mathworks.com/matlabcentral/cody/problems/2319 Problem 2319>. An n-digit number is pandigital if it makes u...

oltre 11 anni fa

Risolto


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

oltre 11 anni fa

Risolto


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

oltre 11 anni fa

Risolto


Finding the next number in a number list, are you able to crack it!
So it goes like this, I give a number list and you find the next value! I found a way to do it, just wondering how many other...

oltre 11 anni fa

Risolto


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the righ...

oltre 11 anni fa

Carica altro