解決済み


Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

8年弱 前

解決済み


Create Vector containing following elements
Create Vector containing following elements A=[pi eps NaN inf -inf flintmax];

8年弱 前

解決済み


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

8年弱 前

解決済み


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

8年弱 前

解決済み


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

8年弱 前

解決済み


Sum all integers from 1 to 2^x
Given a number x, your function must return the summation of all integers from 1 to 2^x.

8年弱 前

解決済み


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

8年弱 前

解決済み


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

さらに読み込む