Solved


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

1 month ago

Solved


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

1 month ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

1 month ago

Solved


Determine if a four bar mechanism is of Grashof type
A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

1 month ago

Solved


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

1 month ago

Solved


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

1 month ago

Solved


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

1 month ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

1 month ago

Solved


Draw a '7' in a zero matrix!

1 month ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

1 month ago

Solved


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

1 month ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

1 month ago