Undergraduate student of Electrical and Electronic Engineering at Islamic University of Technology.

Solved

Remove the two elements next to NaN value

The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

4 months ago

Solved

Clean the List of Names

Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

4 months ago

Solved

Sum of diagonals

Compute the sum of diagonal elements of a square matrix and store the larger sum to s. Eg : a = [1 2 3; 2 3 4; 4 5 10] ...

4 months ago

Solved

Divisible by 3

Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

4 months ago

Solved

Divisible by 10

Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

4 months ago

Solved

Divisible by 2

This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

4 months ago

Solved

Divisible by 5

Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

4 months ago

Solved

Check if there are white spaces in the input string

If there are white spaces in the input string, output=1 else 0

4 months ago

Solved

Return median of a matrix

Compute median of a matrix of any dimension. Exclude the NaNs if any.

4 months ago

Solved

Find all repeated numbers

For a given vector, find all numbers that repeated 2 times or more than 2 times. Example: A=[1 2 3 3 4 5 6 6 7] y=[3 ...

4 months ago

Solved

Prime numbers between a , b.

Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

4 months ago

Solved

Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)

For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

5 months ago

Solved

Create an n-by-n null matrix and fill with ones certain positions

The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

5 months ago

Solved

Quote Doubler

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

5 months ago

Solved

Volume of a Parallelepiped

Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

5 months ago

Solved

Angle between Two Vectors

The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

5 months ago

Solved

Return a list sorted by number of occurrences

Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

5 months ago

Solved

サイコロを作ろう

1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例： >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

5 months ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

5 months ago

Solved

Replace NaNs with the number that appears to its left in the row.

Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

5 months ago

Solved

Vector Multiplication

Vector Multiplication of three matrix as shown in test cases.

5 months ago

Solved

Sum the 'edge' values of a matrix

Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

5 months ago

Solved

Create a square matrix of zeros of even order

Create a square matrix of zeros of even order

5 months ago