Resuelto


determine amount cookies left
started with 3 cookies and you never ate any how many are left

más de 7 años hace

Resuelto


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

más de 7 años hace

Resuelto


Simple polynomial evaluation
Compute the value of a polynomial of degree n with all coefficients '1', at value x. n is always n>=0. p(x)=1+x+x^2+...+x^n...

más de 7 años hace

Resuelto


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

más de 7 años hace

Resuelto


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

más de 7 años hace

Resuelto


Logarithm with base other than 'e'
The standard log() function in Matlab returns the natural logarithm (base equal to Euler's constant). Compute the logarithm for ...

más de 7 años hace

Resuelto


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Calculate roots of polynomial given as vector array.
Calculate roots of polynomial given as vector array. Example x=[1 2 0 5 0 3] result=[-2.7267 ; ...

más de 7 años hace

Resuelto


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

más de 7 años hace

Resuelto


Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...

más de 7 años hace

Resuelto


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

más de 7 años hace

Resuelto


Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

más de 7 años hace

Resuelto


Check availability of a number in an array
An array is given A=[1 2 3 4 5 7 8 9 10]. Find whether the number n is present in given array or not. If the number n is prese...

más de 7 años hace

Resuelto


Geometric Series
Given x and n, give the sum of x ^ 1 to x ^ n. You should not have to use a loop for this.

más de 7 años hace

Resuelto


Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...

más de 7 años hace

Resuelto


Percentage profit
If you are buying at x dollar, what will be the selling price for making the r% profit?

más de 7 años hace

Resuelto


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

más de 7 años hace

Resuelto


Replace Nan!
Replace Nan in the given vector(v) with 9999.

más de 7 años hace

Resuelto


determine if
determine if the elements of a matrix is a nan and return true

más de 7 años hace

Resuelto


Calculate Simple Intrest for given data
P,N,R stands for Principle amount, No. of years and rate of intrest resp. Calculate intrest I

más de 7 años hace

Resuelto


Find the biggest digit in a matrix
Write a function to find the biggest digit in a matrix; input -> a matrix output -> a digit For example; [12; 47;...

más de 7 años hace

Resuelto


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

más de 7 años hace

Resuelto


Set x value to each even index of vector y.
Set x value to each even index of vector y.

más de 7 años hace

Resuelto


Soccer - TOTO
How many different outcomes are there in a soccer-TOTO with n games? For each game there are three results: win - loss - equa...

más de 7 años hace

Resuelto


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

más de 7 años hace

Resuelto


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

más de 7 años hace

Resuelto


Sum two matrices
Take two incoming matrices, and sum them

más de 7 años hace

Resuelto


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

más de 7 años hace

Resuelto


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

más de 7 años hace

Cargar más