A résolu

Median filter over three values
Implement 1-D median filter over input vector x as described: Moving window size is 3 Output is middle/central value in moving...

10 mois il y a

A résolu

Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

10 mois il y a

A résolu

subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

10 mois il y a

A résolu

Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

10 mois il y a

A résolu

Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

10 mois il y a

A résolu

Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

10 mois il y a

A résolu

Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

10 mois il y a

A résolu

Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

10 mois il y a

A résolu

Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

10 mois il y a

A résolu

Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

10 mois il y a

A résolu

Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

10 mois il y a

A résolu

Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

10 mois il y a

A résolu

Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

10 mois il y a

A résolu

Power Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that represent powers. Fo...

10 mois il y a

A résolu

Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

11 mois il y a

A résolu

Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

11 mois il y a

A résolu

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

11 mois il y a

A résolu

Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

11 mois il y a

A résolu

frame of the matrix
Given the matrix M, return M without the external frame.

11 mois il y a

A résolu

Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

11 mois il y a

A résolu

Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

11 mois il y a

A résolu

Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

11 mois il y a

A résolu

Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

11 mois il y a

A résolu

Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime numb...

11 mois il y a

A résolu

Stress-Strain Properties - 5
Similar to the previous problem, materials may be characterized by their stiffness-to-weight ratio, which is the elastic modulus...

11 mois il y a

A résolu

Stress-Strain Properties - 4
A common measure of the ability of a material to carry load per unit mass is termed strength-to-weight ratio and is calculated b...

11 mois il y a

A résolu

Stress-Strain Properties - 3
A brittle material will not exhibit a yield point. In other words, the yield point and failure point coincide. In such cases, th...

11 mois il y a

A résolu

Stress-Strain Properties - 2
The resilience of a material is its ability to resist permanent (or plastic) deformation. The resilience coincides with the elas...

11 mois il y a

A résolu

Stress-Strain Properties - 1
This is the first in a series of problems regarding mechanics of materials, in particular, material properties drawn from stress...

11 mois il y a

A résolu

Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

11 mois il y a