Solved


findPositiveEvenNumbers
Write a MATLAB function findPositiveEvenNumbers that takes an array of integers as input and returns a new array containing only...

1 year ago

Solved


Sum of Squares
Given a vector v of length n, write a MATLAB function to calculate the sum of the squares of its elements.

1 year ago

Solved


A times B
A times B

1 year ago

Solved


Bag of apples
find probabilty of getting red apples from a bag of 'r' red and 'g' green apples.

1 year ago

Solved


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

1 year ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

1 year ago

Solved


Power The Product
EXAMPLE: INPUT x=10 & y=10 OUTPUT z=1000000 or, INPUT x=2 & y=3 OUTPUT z= 216 you just need to calculate the product first...

1 year ago

Solved


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

1 year ago

Solved


Matrix Generation.
if input n =1, generate a matrix y = [1]

1 year ago

Solved


find the relation...
if given input is 1, output is 4. if input is 55, output is 3136.

1 year ago

Solved


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

1 year ago

Solved


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

1 year ago

Solved


Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

1 year ago

Solved


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

1 year ago

Solved


New Matrix with vector addition on diagonal
consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

1 year ago

Solved


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

1 year ago

Solved


Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

1 year ago

Solved


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

1 year ago

Solved


check whether a number is a pentatope number
<https://oeis.org/A000332>

1 year ago

Solved


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

1 year ago

Solved


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

1 year ago

Solved


Sort in descending order.

1 year ago

Solved


Summation of integers

1 year ago

Solved


Summy's even sum

1 year ago

Solved


Summy's odd sum

1 year ago

Solved


Calculate the sum of elements of n*n Hilbert matrix.
Calculate the sum of elements of n*n Hilbert matrix. For example, for n=5: HilbertMatrix = [1.0000 0.5000 0.333...

1 year ago

Solved


Compare two strings.
Compare two strings, whether they are equal or not.

1 year ago

Solved


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

1 year ago

Solved


Replace x value into y value in string text.
Replace x value into y value in string text. Example text='Hello World' x='World', y='Universe' result='Hello Universe'.

1 year ago

Solved


Solve expression II
Solve given expression. alpha=0.1(-x-y-50)/(exp((-x-y-50)/10)-1) beta=5exp((-x+y-60)/20) result=alpha+beta;

1 year ago

Load more