Info

This question is closed. Reopen it to edit or answer.

Getting an error on my reshape function

1 view (last 30 days)
Prajwal Venkatesh
Prajwal Venkatesh on 27 Jan 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
%%
[~,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 Comment
Geoff Hayes
Geoff Hayes on 27 Jan 2020
Prajwal - what is the error message? Please copy and paste the full error message to this question.

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!