Unable to perform assignment because the size of the left side is 1-by-35 and the size of the right side is 1-by-39

1 view (last 30 days)
for(SFRtype=SINUSOID);
dwmin(i)=ytN(tmin(i),param);
end
bilbus1=bilbus1+1;
for j=1:k
dataA1(bilbus1,:)=[bilbus1 fobj1 x dwmin tmin tau sum_dP wss] %error in this line
end
end

Answers (1)

Image Analyst
Image Analyst on 7 Feb 2020
It's just normal debugging. You need to figure out what all the sizes of those variables are and why you're creating a row vector with 39 elements and trying to stuff it into the "bilbus1" row of a matrix that has only 35 elements. If you still can't figure it out, tell us size of bilbus1, fobj1, x, dwmin, tmin, tau, sum_dP, and wss are, and we'll add up the lengths and show you how it equals 39. But why you're concatenating so many variables, or variables of the unintended size(s), we won't know. Only you'll know that.

Categories

Find more on Bounding Regions in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!