Resuelto

Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

más de 1 año hace

Resuelto

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

más de 1 año hace

Resuelto

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

más de 1 año hace

Resuelto

Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

más de 1 año hace

Resuelto

Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

más de 1 año hace

Resuelto

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

más de 1 año hace

Resuelto

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

más de 1 año hace

Resuelto

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

más de 1 año hace

Resuelto

Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

más de 1 año hace

Resuelto

Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

más de 1 año hace

Resuelto

Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

más de 1 año hace

Resuelto

Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

más de 1 año hace

Resuelto

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

más de 1 año hace

Resuelto

Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

más de 1 año hace

Resuelto

Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

más de 1 año hace

Resuelto

Sum of series IX

más de 1 año hace

Resuelto

Sum of series VIII

más de 1 año hace

Resuelto

Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

más de 1 año hace

Resuelto

Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

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

más de 1 año hace

Resuelto

Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

más de 1 año hace