*I want to plot the k no. of matrices, but I am getting error as; ??? Error using ==> plot Data may not have more than 2 dimensions.
Plz, sort out it.*

댓글 수: 1

Image Analyst
Image Analyst 2012년 2월 3일
No, I'm not going to sort it out for you. There is nothing to sort out - at least not HERE. You haven't given us a single thing to sort. Are you going to post your code? How else could anyone sort anything out? I don't even know what "the k no." is!

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 2월 3일

0 개 추천

You are working with a 3D array in your recent questions. plot() can only handle 2D arrays. Loop over one of your dimensions, plot()'ing the 2D slice, with "hold on" if you want them all in the same plot.
One of your earlier questions involves fft(). fft() usually produces complex values. You will need to use real() or imag() or abs() to transform the complex values to real values that can be plotted.
You should give more thought as to whether line plots are appropriate for your data. You should be considering surface plots, perhaps using mesh() or surf().

댓글 수: 4

Amit
Amit 2012년 2월 3일
??? Error using ==> mesh at 72
Property value pairs expected.
Amit
Amit 2012년 2월 3일
??? Error using ==> mesh at 72
Property value pairs expected.
Error in ==> dft_tran1 at 36
mesh(dft,'.')
??? Error using ==> mesh at 72
Property value pairs expected.
Error in ==> file at 36
mesh(real(),imag(),abs(),'.')
Amit
Amit 2012년 2월 3일
Hi Walter can you please tell me what I have to do, I tried your way but not get the plots.
Walter Roberson
Walter Roberson 2012년 2월 3일
for i = 1 : k
subplot(k,k,i);
mesh(abs(a(:,:,k));
end

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

태그

질문:

2012년 2월 3일

편집:

2013년 9월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by