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...
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]
...
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...
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...
With apologies to William Blake
Coder Coder, typing fast
Sitting at your desk, aghast.
What immortal MATLAB script
will solve this problem, nice and qu...
Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...