Skip to content

Instantly share code, notes, and snippets.

@shaybensasson
Created March 4, 2015 08:57
Show Gist options
  • Save shaybensasson/6935bb7498f83bbda590 to your computer and use it in GitHub Desktop.
Save shaybensasson/6935bb7498f83bbda590 to your computer and use it in GitHub Desktop.
pad array with NaNs
a = [ 1 2 3 4' ];
b = padarray(a,[0 3], NaN, 'pre')
b = padarray(b,[0 4], NaN, 'post')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment