我的平均值大于0,然后放100个,否则放100个零,但我不能让它工作。如何在MATLAB中存储一个和零的数组
zero = zeros(1,100);
one = ones(1, 100);
demodulation = [zero zero zero zero zero zero zero zero];
for i=1:1:8;
if (average > 0)
demodulation(i) = ones(1,100);
else
demodulation(i) = zeros(1,1);
end
但我得到这个错误在MATLAB: http://prntscr.com/2ie6k1
In an assignment A(I) = B, the number of elements in B and I must be the same.
Error in roman_test (line 50)
demodulation(i) = ones(1,100)
解调也可以是二维阵列。 – User1551892