Unable to perform assignment because the left and right sides have a different number of elements.
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
load C:\Users\Ranna\Downloads\2017-05-12_batchdata_updated_struct_errorcorrect.mat
batch1 = batch;
numBat1 = size(batch1,2);
load C:\Users\Ranna\Downloads\2017-05-12_batchdata_updated_struct_errorcorrect.mat
%Some batteries continued from the first run into the second. We append
%those to the first batch before continuing.
add_len = [661, 980, 1059, 207, 481];
summary_var_list = {'cycle','QDischarge','QCharge','IR','Tmax','Tavg',...
'Tmin','chargetime'};
batch2_idx = [8:10,16:17];
for i=1:5
batch1(i).cycles(end+1:end+add_len(i)+1) = batch(batch2_idx(i)).cycles;
0 commentaires
Réponses (1)
Image Analyst
le 15 Jan 2022
What is
size(batch(batch2_idx(i)).cycles)
and what is the value of add_len(i)? Evidently they're not the same value so you're trying to stuff either more or fewer elements into a stretch of an array that is defined to be add_len(i) long.
0 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!