Info

此问题已关闭。 请重新打开它进行编辑或回答。

Getting an error on my reshape function

1 次查看(过去 30 天)
%%
[~,sheet_name]=xlsfinfo('Bunks.xlsx');
for k=1:numel(sheet_name)
[~,data{k}]=xlsread('Bunks.xlsx',sheet_name{k});
end
for i=1:k
data2{:,i}=string(data{:,i});
end
clc
for j=1:k
matchingstring{1,j}=regexp(data2{1,j}, '[A-Z]{2}\d{4}', 'match');
for l=1:size(data{1,j},1)
for m=1:size(data{1,j},2)
element=data{1,j}(l,m);
count=isstrprop(element,'alpha');
if nnz(cell2mat(count))>7
newdata{1,j}(l,m)=element;
end
end
end
end
%% till the above line it works fine
for it4=1:k
D1=newdata{1,it4}.';
out{1,it4} = reshape(D1(~cellfun(@isempty,D1)),size(newdata{1,it4},1),[])';
out{1,it4} =convertStringsToChars(out{1,it4});
end
  1 个评论
Geoff Hayes
Geoff Hayes 2020-1-27
Prajwal - what is the error message? Please copy and paste the full error message to this question.

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by