Error when plot3 is used: vectors must be of same length
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to plot all the fft plots in a single figure. something like the attached image
Here's my code
for i=1:m
[f(i,:) mag(i,:)]=fftplot(2000000,corr_amp(i,:));
end;
plot3(f,load,mag);
when i used plot3 it is not coming as in the image
Can someone help me to figure it out?
Athira
0 个评论
回答(1 个)
Jan
2017-3-29
The error message is clear: f, load and mag do not have the same size. Because f and mag should have the same size, I guess that load is the problem.
Please check its size. Perhaps a simple transpose() is enough. But if other operations are required, you have to explain at first, what you want to happen with the values of load.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Frequency Transformations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!