Gelöst


find whether it is prime or not
For a given number find if its prime

fast 6 Jahre vor

Gelöst


Change Vector Value
Change the element of the vector with respect to the element of the direction vector If the element of the direction vecto...

fast 6 Jahre vor

Gelöst


Test if a number is numeric or not
Test if a number is numeric or not

fast 6 Jahre vor

Gelöst


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

fast 6 Jahre vor

Gelöst


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

fast 6 Jahre vor

Gelöst


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

fast 6 Jahre vor

Gelöst


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

fast 6 Jahre vor

Gelöst


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

fast 6 Jahre vor

Gelöst


Power of n ?
Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

fast 6 Jahre vor

Gelöst


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

fast 6 Jahre vor

Gelöst


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

fast 6 Jahre vor

Gelöst


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

fast 6 Jahre vor

Gelöst


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

fast 6 Jahre vor

Gelöst


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

fast 6 Jahre vor

Gelöst


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

fast 6 Jahre vor

Gelöst


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

fast 6 Jahre vor

Gelöst


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

fast 6 Jahre vor

Gelöst


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

fast 6 Jahre vor

Gelöst


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

fast 6 Jahre vor

Gelöst


Tax Calculator
Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

fast 6 Jahre vor

Gelöst


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

fast 6 Jahre vor

Gelöst


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

fast 6 Jahre vor

Gelöst


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

fast 6 Jahre vor

Gelöst


Square root of a number
Write a code that will output the square root of x.

fast 6 Jahre vor

Gelöst


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

fast 6 Jahre vor

Gelöst


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

fast 6 Jahre vor

Gelöst


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

fast 6 Jahre vor

Gelöst


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

fast 6 Jahre vor

Gelöst


Product of Array
Given an array of numbers. Get the product of the array.

fast 6 Jahre vor

Gelöst


Box!
Given a box, find the volume of the cube. With each side = a.

fast 6 Jahre vor

Mehr laden