A student of Electrical and Electronic Engineering

Solved

Modified run-length companion vector

Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

7 hours ago

Solved

Create Truth Table of Size according to input

Create a Truth Table Example: n = 3 output = [0 0 0; 0 0 1; 0 1 0; 0 1 1; 1 0 0; 1 0 1; 1 1 0; 1 1 1]

8 hours ago

Solved

Maximum sum from any 2 numbers with a variable number of inputs

Given a variable number of inputs, combine any 2 numbers from the inputs and output the maximum sum the combinations can generat...

8 hours ago

Solved

Basics: counting digits of a number irrespective of the sign

publish the number of digits in any input integer example: -23---->2

10 hours ago

Solved

Product of Each Column

Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

11 hours ago

Solved

square a number twice with square root of 4/5

square a number twice with square root of 4/5

16 hours ago

Solved

ASCII code of a leter.

Given the letter, the output will show the corresponding ASCII code.

16 hours ago

Solved

Cody problems in French : Trouvez la logique Pt.2

Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

16 hours ago

Solved

Feeling lucky?

Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

16 hours ago

Solved

Volume of Spherical Shell

In three-dimensional space, a spherical shell can be constructed from two concentric spheres. Determine the volume of a spheric...

17 hours ago

Solved

Calculating Ring Area

In two-dimensional space, a ring can be constructed by using two concentric circles. Determine the area of a ring which has r1 ...

17 hours ago

Solved

Probability of red tulips (at both ends of a row)

I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

17 hours ago

Solved

Calculate feeling temperature before climbing a mountain

I sometimes climb a mountain. As is well known, when the altitude becomes 100 (m) higher, the temperature lowers by 0.6 degrees...

17 hours ago

Solved

Outlier number!

Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

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

17 hours ago

Solved

Vector pop

Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

18 hours ago

Solved

How many days in a month?

Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

18 hours ago

Solved

Separate even from odd numbers in a vector - without loops

*Without using loops*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the...

18 hours ago

Solved

How to permute given 3d matrix?

A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

18 hours ago

Solved

Where is 1?

There is a 3d matrix [A] that consist of many zeros and only one. A=zeros(100,100,100); i=randi(100); j=randi(100); ...

18 hours ago

Solved

Case-insensitive Character Detection

Find the index of a particular character in a string ignoring case. Example Input: x = 'aAbhhfdf' n = 'a' ...

19 hours ago