Solved

create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last row's elements are the summation of the elements of all the other rows; where 'n' is the size of the input matrix 'x'.

for example x=[1 2 3;4 5 6;7 8 9] then y=[1 2 3 6; 4 5 6 15; 7 8 9 24; 12 15 18 45]

6 months ago

Solved

time of day

Calculate the time of day in days, hours, minutes or seconds passed since the beginning of the day, depending on the unit. The u...

6 months ago

Solved

Check if integer is a prime number

Check if integer i is a prime number. Returns logical true '1' if it is.

6 months ago

Solved

Perimeter of a square!

Calculate the circumference of the square whose side is n

6 months ago

Solved

Repeat elements of a vector

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

6 months ago

Solved

microseconds passed today

Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

6 months ago

Solved

Check prime numbers

Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

6 months ago

Solved

Given a vector x, return vector y with all negative elements from the vector x.

Given a vector x, return vector y with all negative elements from the vector x if x has negative elements. Otherwise return 0. ...

6 months ago

Solved

Frequency Analysis of Text

Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

6 months ago

Solved

Check capital letters

Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

6 months ago

Solved

Project Euler: Problem 11, Largest product in a grid

What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

6 months ago

Solved

Archimedes principle

According to Archimedes principle, the buoyancy force is equal to the weight of fluid displaced by the submerged portion of an o...

6 months ago

Solved

Some tweaks in summation, Can you decode? :)

There are some tweaks in summation that you might observe via test suites Try if you can

6 months ago

Solved

area of an annulus

Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

6 months ago

Solved

Logical array indexing - part 1

Given an array |A| of size |p x q| , return an array |Y| of the same size such that the following conditions are satisfied. (...

6 months ago

Solved

Find MPG of Lightest Cars

The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

6 months ago

Solved

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

6 months ago

Solved

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

6 months ago