Skip to content

Instantly share code, notes, and snippets.

@kor01
Created July 25, 2017 00:52
Show Gist options
  • Save kor01/46f1c3506b0da6173f5b600b829a5e27 to your computer and use it in GitHub Desktop.
Save kor01/46f1c3506b0da6173f5b600b829a5e27 to your computer and use it in GitHub Desktop.
[matlab array] matlab array operations #matlab
%% get size
d = size(a, 2)
e = size(a, 1)
%% drop singleton dimension
a = squeeze(b)
%% construct
e = [1,2,3; 4,5,6]
%% zeros
f = zeros(1,2,3)
%% slice
e = f(1, :, :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment