Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Getting an error on my reshape function

1 vue (au cours des 30 derniers jours)
Prajwal Venkatesh
Prajwal Venkatesh le 27 Jan 2020
Clôturé : MATLAB Answer Bot le 20 Août 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 commentaire
Geoff Hayes
Geoff Hayes le 27 Jan 2020
Prajwal - what is the error message? Please copy and paste the full error message to this question.

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by