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