A résolu


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

plus de 7 ans il y a

A résolu


Compound interest - number e
A moneylender wants to receive his annual interest of 12% more frequently. If he receives his interest rate every six months,...

plus de 7 ans il y a

A résolu


convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere
Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

plus de 7 ans il y a

A résolu


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

plus de 7 ans il y a

A résolu


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

plus de 7 ans il y a

A résolu


row removal
Remove the nth row from input matrix M and return the resulting matrix in output N.

plus de 7 ans il y a

A résolu


Write a function to calculate step size delta if bits per sample and input range is given for quantization.
numBit = bits per sample; range = input max value - min value; delta = step size; l = number of levels;

plus de 7 ans il y a

A résolu


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

plus de 7 ans il y a

A résolu


Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix. examples: Input A=[1 2 3 5 6;52 58 56 45...

plus de 7 ans il y a

A résolu


number of groups
In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

plus de 7 ans il y a

A résolu


First use of arrayfun() and anonymous function @(x)
Create an anonymous function using @(x) for a parabola equation for the given coefficients stored in s with s(1)x2 + s(2)x +...

plus de 7 ans il y a

A résolu


Can the given sides form a triangle?
Can the three given sides form a triangle?

plus de 7 ans il y a

A résolu


Matrix game: Winner takes all
Given a matrix A, return a new matrix of the same size in which the biggest element of each column in A takes 1, and 0 for all t...

plus de 7 ans il y a

A résolu


Find the maxmum value of N*N Matrix
Input x=[1 2 3; 4 5 6; 7 8 9] output: y=9

plus de 7 ans il y a

A résolu


Find my secret function III
only write a function gives you an outputs as expls: input: x=2 ------->>> Output: Y=1 input: x=100 ------->>> Output: Y=...

plus de 7 ans il y a

A résolu


Find my secret function I
If give my function a x value it will give me a y value, so find the secret of it: Examples: input x=[2 5 6 8 9] ---- >>> o...

plus de 7 ans il y a

A résolu


Determine whether the number is multiple of 3 or not
Let a=6 and as 6 = 2*3 which means 6 is multiple of 3; return true if a is multiple of 3,otherwise false.

plus de 7 ans il y a

A résolu


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.

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

plus de 7 ans il y a

A résolu


Speed of car travelling x meters in y seconds
What is the speed of a car if the car travelled x meters in y seconds? Supply the answer in m/s.

plus de 7 ans il y a

A résolu


raise 1/3
Raise a number to 1/3 power.

plus de 7 ans il y a

A résolu


calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

plus de 7 ans il y a

A résolu


Delete the column with all 0 !
Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

plus de 7 ans il y a

A résolu


Area of square
Find the area of a square whose diagonal length is given as x.

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Sum of self power series
The series, 1^1,2^2,3^3,4^4,.... Find the sum of such series when x terms are given.

plus de 7 ans il y a

A résolu


Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

plus de 7 ans il y a

A résolu


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

plus de 7 ans il y a

Charger plus