Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

2 years ago

Solved


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

2 years ago

Solved


Narcissistic problem
How many likes has this problem?

2 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

2 years ago

Solved


Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3) Example: x = 5 y = [0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

2 years ago

Solved


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

2 years ago

Solved


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

2 years ago

Solved


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

2 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

2 years ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

2 years ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

2 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

2 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

2 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

2 years ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

2 years ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

2 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

2 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

2 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

2 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

2 years ago

Solved


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

2 years ago

Solved


Compute Fibonacci Number
Compute the n-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

2 years ago

Solved


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

2 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

2 years ago

Solved


Coefficient of Sliding Friction
A weight of W1 N rests on a horizontal plane. The plane is gradually inclined until at an angle θ = Ao with the horizontal, the ...

2 years ago

Solved


Basic Mathematics 3
It was announced during a Robotics Competition kick off that two of the trickiest scoring objects are: soup cans, and beach ball...

2 years ago

Solved


Basic Mathematics 1
If a robot is traveling on a north heading at v1 inches per second and has the ability to only make N degree changes in directio...

2 years ago

Solved


Basic Mathematics 2
If a 4’ x 8’ sheet of ½” plywood weighs W lbs and you cut an L” x L” robot base from this material, approximately how much weigh...

2 years ago

Solved


Linear Motion 6
An experimental vehicle traveling at v1 m/s is brought to a full stop in t seconds. How far does it travel before stopping? Roun...

2 years ago

Solved


Linear Motion 5
A robot moving down an incline for 3 seconds undergoes a uniform acceleration of a ft/s2. If the robot has an initial velocity o...

2 years ago

Load more