Skip to content

Commit 9fe1c5c

Browse files
authored
Merge pull request #13 from OSU-LRAM/Ross
Ross
2 parents 7f35137 + a8f69b6 commit 9fe1c5c

File tree

326 files changed

+5246
-789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+5246
-789
lines changed
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
function B = celltensorconvert(A)
2+
% Takes an NxMx... cell array of YxZx... arrays, and returns an YxZx... cell array of
3+
% NxMx.. arrays
4+
5+
6+
% Create a cell containing a matrix whose dimensions are taken from A
7+
new_cell = {zeros(size(A))};
8+
9+
% Replicate this cell to make a cell array whose dimensions are taken from
10+
% the contents of (the first value of) A
11+
B = repmat(new_cell,size(A{1}));
12+
13+
for i = 1:numel(A)
14+
15+
for j = 1:numel(B)
16+
17+
B{j}(i) = A{i}(j);
18+
19+
end
20+
21+
end

0 commit comments

Comments
 (0)