Solved

02 - Vector Variables 3

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

4 years ago

Solved

02 - Vector Variables 2

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

4 years ago

Solved

01 - Scalar variables

Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

4 years ago

Solved

03 - Matrix Variables 6

Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

4 years ago

Solved

02 - Vector Variables 1

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

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

4 years ago

Solved

Nearest Numbers

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

4 years ago

Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

4 years ago

Solved

Counting pulses in a signal

Count the number of pulses that are the result of summing each pulse generator block. Pulse Generator blocks produce a recurr...

4 years ago

Solved

Finding Perfect Squares

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

4 years ago

Solved

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

4 years ago

Solved

Produce a Fibonacci sequence

Construct a diagram that generates the Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34.....up to 377 The Fibonacci sequ...

4 years ago

Solved

Sum the 'edge' values of a matrix

Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

4 years ago

Solved

Model a falling body

An object is falling freely from a height of 22 meters under the force of gravity. <<http://blogs.mathworks.com/images/seth/c...

4 years ago

Solved

Compare two input matrices

Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

4 years ago

Solved

Multiply by 3

Given the variable x as your input, multiply it by three and put the result in y.

4 years ago

Problem

Step up

For given input array, output a array with all elements step up by two

4 years ago | 0

Solved

Which doors are open?

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

4 years ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

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

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

4 years ago

Solved

Determine if input is odd

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

4 years ago

Solved

multiple of nine?

Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

4 years ago

Solved

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

4 years ago