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...
8年以上 前
解決済み
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 ...
8年以上 前
解決済み
intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...
8年以上 前
解決済み
Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...
8年以上 前
解決済み
Getting the indices from a matrice
Getting the indices from a matrice.
Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull.
Given a...
8年以上 前
解決済み
Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value.
3 Inputs:
...
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]
...
8年以上 前
解決済み
Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes.
---
Logical indexing works like this.
thresh = 4...