Assistant Professor at the University of the Philippines - Diliman, Department of Chemical Engineering; Ph.D. in Energy and Power (2020) from Cranfield University, U.K.; Research Interests: process data analytics, process systems engineering, applications of machine learning to chemical and process engineering.

Solved

Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}

if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

1 hour ago

Solved

Moving Product (Easy)

Given an input array A, write a function *movprod(A,k,dim)* to calculate the moving product over a sliding window of length *k* ...

5 hours ago

Solved

Cookie Cutters

Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

5 hours ago

Solved

Compress strings (not springs)

Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

5 hours ago

Solved

Matrix to 3-Column Matrix

Consider a matrix *A* such as A = [1 2 3 3 4 5 6; 2 3 4 5 6 7 8]; Can you convert this matrix to a three-column ...

6 hours ago

Solved

Vector to 3-Column Matrix

Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

6 hours ago

Solved

Sunday bonus

Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

6 hours ago

Solved

Create tangent function out of cosine only

Please don't use tangent and sine functions

7 hours ago

Solved

cross in array

Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

7 hours ago

Solved

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

7 hours ago

Solved

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

7 hours ago

Solved

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.

7 hours ago

Solved

Joules to Megatons of TnT

Given joules, J, make a function that converts to megatons of TNT.

7 hours ago

Solved

Find the mean of two vectors

Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

7 hours ago

Solved

Sum the rows

Sum the rows of the given matrix. Example x = [ 1 2 3 4 ] y = [ 3 7 ]

7 hours ago

Solved

Sum positive elements of matrix.

Calculate sum of positive elements of the matrix.

7 hours ago

Solved

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

7 hours ago

Solved

row removal

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

7 hours ago

Solved

Sum! Sum! Sum!

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

7 hours ago

Solved

Polynomial division

Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

8 hours ago

Solved

Sort complex numbers into complex conjugate pairs

Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

8 hours ago

Solved

Finding peaks

Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

8 hours ago

Solved

calculate the tangent of angle in radians

Calculate the tangent of angle in degrees

8 hours ago

Solved

Finding sum of even numbers in a vector.

Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

8 hours ago

Solved

Problem for beginners

Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

8 hours ago

Solved

Stairs

Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

8 hours ago