waterfall plot show error

1 次查看(过去 30 天)
Raady
Raady 2017-4-15
I have three signals of 4096 time amplitudes in each.
signal1 = channel1(1:4096);
signal2 = channel2(1:4096);
signal3 = channel3(1:4096);
figure(1);
% waterfall(signal1',signal2',signal3');
waterfall(signal1,signal2,signal3);
it says
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
but my signal is of same duration(length). How plot it ? I want to compare the amplitudes of the signals in waterfall plot rather than subplots. Do I need to input any other things for the plot ?

回答(1 个)

Star Strider
Star Strider 2017-4-15
Try this:
channel1 = sin(pi*[1:4096]/1024); % Create Data
channel2 = cos(pi*[1:4096]/1024); % Create Data
channel3 = sin(pi*[1:4096]/1024).*cos(pi*[1:4096]/2048); % Create Data
signal1 = channel1(1:4096);
signal2 = channel2(1:4096);
signal3 = channel3(1:4096);
figure(1);
% waterfall(signal1',signal2',signal3');
waterfall([signal1; signal2; signal3]); % Concatenate Vectors Into A Matrix

类别

Help CenterFile Exchange 中查找有关 Propagation and Channel Models 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!