代码如下:
for i = 1:1000
x1 = TMP(i).SonarReturnData.BeamsOutput([1:200],[25]);
x2 = TMP(i).SonarReturnData.BeamsOutput([1:200],[26]);
x3 = TMP(i).SonarReturnData.BeamsOutput([1:200],[27]);
x4 = TMP(i).SonarReturnData.BeamsOutput([1:200],[28]);
x5 = TMP(i).SonarReturnData.BeamsOutput([1:200],[29]);
x6 = TMP(i).SonarReturnData.BeamsOutput([1:200],[30]);
x7 = TMP(i).SonarReturnData.BeamsOutput([1:200],[31]);
x8 = TMP(i).SonarReturnData.BeamsOutput([1:200],[32]);
x9 = TMP(i).SonarReturnData.BeamsOutput([1:200],[33]);
x10 = TMP(i).SonarReturnData.BeamsOutput([1:200],[34]);
x11 = TMP(i).SonarReturnData.BeamsOutput([1:200],[35]);
X = (x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11)/11;
S(i) = X(X>10);
end
plot(S);
我收到以下错误:
Improper assignment with rectangular empty matrix.
Error in open83B_edited_3 (line 189)
S(i) = X(X>10);
有人可以帮忙找到避免此错误的方法吗?谢谢。