A résolu


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

presque 4 ans il y a

A résolu


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

presque 4 ans il y a

A résolu


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

presque 4 ans il y a

A résolu


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

presque 4 ans il y a

A résolu


Sum! Sum! Sum!
Calculate the sum of the sequence up to nth term >> a,aa,aaa,aaaa,... 2,22,222,2222,... [for a=2]

presque 4 ans il y a

A résolu


Check if integer is a prime number
Check if integer i is a prime number. Returns logical true '1' if it is.

presque 4 ans il y a

A résolu


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

presque 4 ans il y a

A résolu


Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

presque 4 ans il y a

A résolu


Translate German decimals to English decimals
The string 'x = [2,5; 5,5; 4,3];' should return 'y = [2.5; 5.5; 4.3];'

presque 4 ans il y a

A résolu


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

presque 4 ans il y a

A résolu


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

presque 4 ans il y a

A résolu


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

presque 4 ans il y a

A résolu


Find Logic 31

environ 4 ans il y a

A résolu


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

environ 4 ans il y a

A résolu


Whole Number Un-Concatenator
Write a function that accepts an integer and an index digit and returns a vector containing two integers which are the leading a...

environ 4 ans il y a

A résolu


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

environ 4 ans il y a

A résolu


Replace all odd numbers with NaN
Replace all odd numbers in the vector or matrix with NaN. For example, if x = [1 3 4 5 8 11]; then return y = [NaN Na...

environ 4 ans il y a

A résolu


Largest Prime Number
Given a matrix X, find the largest prime number in X.

environ 4 ans il y a

A résolu


Times 5
Try out this test problem first. Given the variable x as your input, multiply it by five and put the result in y. Examples...

environ 4 ans il y a

A résolu


Times 10
Try out this test problem first. Given the variable x as your input, multiply it by ten and put the result in y. Examples:...

environ 4 ans il y a

A résolu


Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

environ 4 ans il y a

A résolu


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

environ 4 ans il y a

A résolu


Min-Max digit

environ 4 ans il y a

A résolu


Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

environ 4 ans il y a

A résolu


Calculate Triangle Area: A, B and Beta is given

environ 4 ans il y a

A résolu


ascii value
let input='a' output=97

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

environ 4 ans il y a

Charger plus