Unable to perform assignment because the size of the left side is 98-by-50 and the size of the right side is 98-by-32.

1 Ansicht (letzte 30 Tage)
parfor ii = 1:numPar
subds = partition(adsTrain,numPar,ii);
XTrain = zeros(numHops,numBands,1,numel(subds.Files));
for idx = 1:numel(subds.Files)
x = read(subds);
xPadded = [zeros(floor((segmentSamples-size(x,1))/2),1);x;zeros(ceil((segmentSamples-size(x,1))/2),1)];
XTrain(:,:,:,idx) = extract(afe,xPadded);
end
XTrainC{ii} = XTrain;
end

Antworten (3)

Matt J
Matt J am 1 Jul. 2020
Make the right hand side and the left hand side the same size.

Gurpreet Singh
Gurpreet Singh am 1 Jul. 2020
Hi Ardian,
To perform any assignment dimension of the element on the left-hand side should be equal to the dimension of the element on the right-hand side.

VBBV
VBBV am 27 Feb. 2022
Bearbeitet: VBBV am 27 Feb. 2022
XTrain{idx} = extract(afe,xPadded);% cell array
Use curly brackets just like XTrainC

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by