Advertisement
Guest User

rows2cell.m

a guest
Apr 24th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.34 KB | None | 0 0
  1. function C = rows2cell( A )
  2.     %% rows2cell( A )
  3.     %
  4.     % Inputs
  5.     % A - Matrix to split into row vectors stored as cells
  6.     %
  7.     % Outputs
  8.     % C - Cell with each element a sequential row of A
  9.    
  10.     %% Use mat2cell to perform conversion with appropriate dimensions
  11.     C = mat2cell( A, ones(1,size(A,1)), size(A,2) );
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement