All

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

Solved

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

7 månader ago

Solved

Most nonzero elements in row

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

mer än 2 år ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

mer än 3 år ago

Solved

Determine if input is odd

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

mer än 3 år ago

Solved

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

mer än 3 år ago

Solved

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

mer än 3 år ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

mer än 5 år ago

Question

How can I get square brackets on a Swiss macbook keyboard?

One of my students is using a Swiss macbook for Matlab and we can't find how to get square brackets. We've tried alt-8/9, shift-...

mer än 5 år ago | 1 answer | 0

Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

mer än 6 år ago

Submitted

GPU vs CPU speed test of finite difference equation

Compares the speed of the parallel computing toolbox functions vs CPU for finite difference

nästan 7 år ago | 3 downloads |

Solved

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

mer än 7 år ago

Solved

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

mer än 7 år ago

Solved

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

mer än 7 år ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

mer än 7 år ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

mer än 7 år ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

nästan 8 år ago

Solved

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

nästan 8 år ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

nästan 8 år ago