Surf dimensions do not agree. Help!
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello Matlabers!
I want a surf plot 3 variables but have a dimension problem. please see my code below.
SNRR=[15,30,50];
MV_raw=[0.1:0.1:0.9,0.95,0.99];
Median= 3x10 matrix;
surf( [0.1:0.1:0.9,0.95,0.99],SNRR,Median,'FaceColor',[0 1 0],'FaceAlpha',0.5);
% Error using surf (line 71)
% Data dimensions must agree.
Please help what am i doing wrongly. it was working initially when i had just [0.1:0.1:0.9] but I added more points 0.95 and 0.99 and it not working anymore :D
댓글 수: 0
답변 (1개)
Stephan
2019년 2월 4일
편집: Stephan
2019년 2월 4일
Hi,
the reason for your problem is:
SNRR: 1x3
MV_raw: 1x11
Median: 3x10
This does not work. Either change MV_raw to 1x10 or Median to 3x11.
For example try:
SNRR=[15,30,50];
Median = ... 3x10 Matrix
MV_raw=[linspace(0.1,0.9,8), 0.95, 0.99];
surf(MV_raw, SNRR ,Median, 'FaceColor',[0 1 0],'FaceAlpha',0.5);
Best regards
Stephan
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!