Risolto


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

circa 10 anni fa

Risolto


Find the sum of the negative elements under the main diagonal.
Example Input A=[1 2; -3 0] Output -3

circa 10 anni fa

Risolto


Opposite task convert string hexadecimal numbers array into array of decimal numbers .
Opposite task convert string hexadecimal numbers array into array of decimal numbers . Example x=[ '208'; '209'; '20A'; ...

circa 10 anni fa

Risolto


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


nth Rational Number
Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

circa 10 anni 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 ...

circa 10 anni fa

Risolto


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

circa 10 anni fa

Risolto


Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

circa 10 anni fa

Risolto


Zero Cross
Write a function that counts the number of times n a signal x crosses zero or changes sign. Examples x = [1 2 -3 -4 5 6 ...

circa 10 anni fa

Risolto


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

circa 10 anni 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...

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

circa 10 anni fa

Risolto


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

circa 10 anni fa

Risolto


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

circa 10 anni fa

Risolto


Create tangent function out of sin and cos
Please don't use tan(x) directly

circa 10 anni fa

Risolto


Create tangent function out of cosine only
Please don't use tangent and sine functions

circa 10 anni fa

Risolto


Create tangent function out of sine function only
Please don't use cosine and tangent functions

circa 10 anni fa

Risolto


Create sine function out of cosine
Please don't use sin(x) directly

circa 10 anni fa

Risolto


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

circa 10 anni fa

Risolto


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

circa 10 anni fa

Risolto


Check if a string starts with another string
Input s='He was so tired' q='He' Output ans = true

circa 10 anni fa

Risolto


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

circa 10 anni fa

Risolto


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

circa 10 anni fa

Risolto


iteration of N blank spot
we have N spot which can be blank o filled calculate the number of iteration for these spots. e.g. N=2 1- blank blank 2- bl...

circa 10 anni fa

Risolto


Find smallest number to leave a remainder of 1
given a vector of numbers, find the smallest number to be divisible by all of them with a remainder of 1. Note: input numbers wi...

circa 10 anni fa

Risolto


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

circa 10 anni fa

Risolto


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

circa 10 anni fa

Carica altro