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

1 view (last 30 days)
for k = 2: size(D(:,1))
R(k,3) = max(M(D(k-1,1):D(k,1),3));
[val,idx] = max(M(D(k-1,1):D(k,1),3));
R(k,2) = M((D(k-1)+idx-1),2);
R(k,1) = M((D(k-1)+idx-1),1);
R(k,4) = R(k,2) -R(k,1)*pi/180 -asin(RadiusFunc/LengthFunc*sin(R(k,1)*pi/180));
end
Error in R(1,4) = R(1,2) -R(1,1)*pi/180 -asin(RadiusFunc/LengthFunc*sin(R(1,1)*pi/180));
I get the error mentioned above, could anyone help me find the details? Thanks in advance.

Accepted Answer

DGM
DGM on 1 Jun 2022
Edited: DGM on 1 Jun 2022
RadiusFunc (and possibly LengthFunc) is an empty array. You'll have to find out which ones are empty and why they're empty, because nobody else knows what the rest of your code is.

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!