Solved

Volume of Cylinder

Compute the Circumference of a Cylinder given it's radius and height.Here x is the radius and y is the height

6 meses ago

Solved

Speed of car

Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

6 meses ago

Solved

Volume of a sphere given its surface area

You just measured its surface area, that is the input.

6 meses ago

Solved

Get the mean digit

Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

6 meses ago

Solved

Alternating 1´s and 0´s in a matrix

Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

6 meses ago

Solved

Sum of a geometric series

Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

6 meses ago

Solved

Ratio between sum of primes and sum of factors

Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

6 meses ago

Solved

Ratio between sums of prime and non-prime numbers

Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

6 meses ago

Solved

Check if is a square

Given four coordinates, write a function to check if they form a square on the XY plane.

6 meses ago

Solved

Get the value 100

Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

6 meses ago

Solved

Yet Another Path Finder

Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

6 meses ago

Solved

possible ways through matrix

This problem is inspired from problem 2405 <https://www.mathworks.com/matlabcentral/cody/problems/2405-the-number-of-ways>. C...

6 meses ago

Solved

How many rectangles in a grid ?

How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

6 meses ago

Solved

Which way to go?

Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

6 meses ago

Solved

Number of paths on a n-dimensional grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

6 meses ago

Solved

Number of paths on a 3d grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

6 meses ago

Solved

Number of paths on a grid

Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

6 meses ago

Solved

Path of least resistance - Move all direction

Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

6 meses ago

Solved

Path of least resistance

Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

6 meses ago

Solved

Specific Element Count

Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

6 meses ago

Solved

Solve the Sudoku Row

*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

6 meses ago

Solved

Corresponding letter to ASCII code.

Given the letter, the output will show the corresponding ASCII code.

6 meses ago

Solved

Given the variable x as your input, multiply it by four, then divide it by two. Then put the result in y.

If x = 5, y = 4*5/2 = 10

6 meses ago

Solved

ASCII code of a leter.

Given the letter, the output will show the corresponding ASCII code.

6 meses ago

Solved

Vector with a repeated entry

Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

6 meses ago

Solved

If you have matrix A, create matrix B using matrix A as an "element"

A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

6 meses ago

Solved

Annual Salary

What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

6 meses ago