Solved

Generate a vector like 1,2,2,3,3,3,4,4,4,4

Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...

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

7 months ago

Solved

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

7 months ago

Solved

Maximum value in a matrix

Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

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

7 months ago

Solved

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

7 months ago

Solved

Velocity Conversion

Given a velocity in mph, convert it to km/h. Round the answer to the fourth decimal place.

7 months ago

Solved

Counting Sequence

Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

7 months ago

Solved

Possible Outcomes of American Roulette

The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

7 months ago

Solved

NCHOOSEK - Time Optimization

*Input* * *V* —— Set of all choices, a vector of N, 1 < N < 100 * *K* —— Number of selected choices, a scalar, 0 <= K <=...

7 months ago

Solved

Combinations without using nchoosek

You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

7 months ago

Solved

An Ohm's Law Calculator

*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

7 months ago

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 months ago