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 visualizzazione (ultimi 30 giorni)
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.

Risposta accettata

DGM
DGM il 1 Giu 2022
Modificato: DGM il 1 Giu 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.

Più risposte (0)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by