Getting following error while making Contourf plot [ Error using contourf Z must be at least a 2x2 matrix]
이전 댓글 표시
I am getting this error while making contour plot [ Error using contourf (Z must be at least a 2x2 matrix]. can someone please help how can i make an contour plot and also i wanted to add z data on it . I am basically looking for following contour plot. can someone please help how can i do it . Thanks in advance
clear all
close all
clc
[num,txt,raw] = xlsread('Book1.xlsx') ;
X = num(:,1) ;
Y = num(:,2) ;
Z = num(:,3) ;
figure(1)
contourf(X,Y,Z)

채택된 답변
추가 답변 (1개)
KALYAN ACHARJYA
2022년 11월 8일
편집: KALYAN ACHARJYA
2022년 11월 8일
0 개 추천
You may be look for other data visulization options, as its a 3 column data e.g
stem3, scatter3 or plot3
In mesh, surface, contour, Z much needed as as matrix (where respective valuses are assigned in grid plane)
댓글 수: 3
Prasad Joshi
2022년 11월 8일
KALYAN ACHARJYA
2022년 11월 8일
Can you try using pen and paper to do data visualization in your case (3 column data)? Those surface plots need to have a grid plane/values.
Prasad Joshi
2022년 11월 8일
카테고리
도움말 센터 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

