Resuelto


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.

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


Narcissistic problem
How many likes has this problem?

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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;

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Resuelto


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

casi 3 años hace

Cargar más