Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

3 months ago

Solved

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

4 months ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

4 months ago

Question

Arduino support package win10 compatibility

Hi, I'm trying to get Matlab and Simulink set up to work with an Arduino. However, when I try to install the support package...

4 months ago | 0 answers | 0

Solved

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

9 months ago

Solved

Set some matrix elements to zero

First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

9 months ago

Solved

Permute diagonal and antidiagonal

Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

9 months ago

Solved

Remove the air bubbles

Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

10 months ago

Solved

Make an awesome ramp for a tiny motorcycle stuntman

Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

10 months ago

Solved

surrounded matrix

With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

10 months ago

Solved

Relative ratio of "1" in binary number

Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

10 months ago

Solved

Solving Quadratic Equations (Version 1)

Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

5 years ago

Solved

Lightning strike distance: Writing a function

Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

5 years ago

Solved

Create matrix of replicated elements

Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

5 years ago

Solved

Find out missing number from a vector of 9 elements

You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

5 years ago

Solved

Basics: 'Find the eigenvalues of given matrix

Find the eigenvalues y for a given matrix x.

5 years ago

Solved

Number of toolboxes?

Return a number equal to the number of toolboxes available to the Cody solvers.

5 years ago

Solved

02 - Vector Variables 4

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

5 years ago

Solved

03 - Matrix Variables 4

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

5 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*)

5 years ago

Solved

02 - Vector Variables 2

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

5 years ago

Solved

Getting logical indexes

This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

5 years ago

Solved

Replace May with April

For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

5 years ago

Solved

Make a 1 hot vector

Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

5 years ago

Solved

03 - Matrix Variables 1

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

5 years ago

Solved

01 - Scalar variables

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

5 years ago

Solved

02 - Vector Variables 1

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

5 years ago