Risolto


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.

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


Narcissistic problem
How many likes has this problem?

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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;

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Carica altro