Solved

Put two time series onto the same time basis

Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

meer dan 4 jaar ago

Solved

middleAsColumn: Return all but first and last element as a column vector

Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

meer dan 4 jaar ago

Solved

Generate N equally spaced intervals between -L and L

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

meer dan 4 jaar ago

Solved

First non-zero element in each column

For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

meer dan 4 jaar ago

Solved

Matrix indexing with two vectors of indices

Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

meer dan 4 jaar ago

Solved

Return unique values without sorting

If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

meer dan 4 jaar ago

Solved

Specific Element Count

Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

meer dan 4 jaar ago

Solved

Return elements unique to either input

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

meer dan 4 jaar ago

Solved

Getting logical indexes

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

meer dan 4 jaar ago

Solved

Replicate elements in vectors

Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

meer dan 4 jaar ago

Solved

Set the array elements whose value is 13 to 0

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

meer dan 4 jaar ago

Solved

Find the largest value in the 3D matrix

Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

meer dan 4 jaar ago

Solved

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

meer dan 4 jaar ago

Solved

Make a half wave rectifier

Produce a signal that outputs the given sine wave source when it is greater than zero and outputs zero when it is less than zero...

meer dan 4 jaar ago

Solved

Make a full wave rectifier

Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

meer dan 4 jaar ago

Solved

Add offset to a signal

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

meer dan 4 jaar ago

Solved

Produce a sine wave

Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

meer dan 4 jaar ago

Solved

Produce a cosine wave

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

meer dan 4 jaar ago

Solved

Add a block to a model

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

meer dan 4 jaar ago

Solved

Connect blocks in a model

Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

meer dan 4 jaar ago

Solved

BULLSEYE Part 2: Reference Problem 18 BULLSEYE

Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

meer dan 4 jaar ago

Solved

Triangular matrices in 3D array

Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

meer dan 4 jaar ago

Solved

Calendar Matrix

Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

meer dan 4 jaar ago

Solved

Create a block diagonal matrix

A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

meer dan 4 jaar ago

Solved

Toeplitz Matrix

For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

meer dan 4 jaar ago

Solved

Pascal's pyramid

In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

meer dan 4 jaar ago

Solved

The Matrix Construction

Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

meer dan 4 jaar ago

Solved

Numbers spiral diagonals (Part 1)

Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

meer dan 4 jaar ago

Solved

Numbers spiral diagonals (Part 2)

Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the righ...

meer dan 4 jaar ago

Solved

Diagonal of a Spiral Matrix

Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

meer dan 4 jaar ago