visualise fft plot in 3D
이전 댓글 표시
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,:));
subplot(3,4,i)
plot(f(i,:),mag(i,:))
axis([25000,85000,0,1.1]);
strtime = ['Frequency Spectrum at \delta=', num2str(load(1,i)),'\mum'];
title(strtime,'fontsize',10)
xlabel('Frequency (Hz)')
ylabel('Magnitude')
grid on
grid minor
end;
this code gives me all fft plots as separate plots in a single figure, but i want to arrange all the fft plots in 3D (third axes is 'load' variable in the .mat file attached) as shown in image to see the variation accurately.
채택된 답변
추가 답변 (1개)
KSSV
2017년 4월 4일
You may follow something like this:
x = linspace(0,2*pi) ;
N = 10 ;
pos = 1:N ;
figure
hold on
for i = 1:N
z = i*sin(x) ;
y = repmat(pos(i),size(x)) ;
plot3(x,y,z,'r');
end
view(3)
댓글 수: 1
Daniel Esteban Caballeros Tejada
2021년 2월 10일
Tranks, KSSV
카테고리
도움말 센터 및 File Exchange에서 Image Category Classification에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
