how to plot a contour plot with a csv file.

조회 수: 4 (최근 30일)
Efreen Hernandez-Lerena
Efreen Hernandez-Lerena 2021년 9월 8일
답변: Star Strider 2021년 9월 8일
I have an example set of data to, an excel sheet with the data being the measurements at various positions for an electric field. I am completely new to Matlab and have no prior experience. Some quick searches on my end show how to plot a contour plot, but not how to handle this csv file and how to contour plot it.

답변 (1개)

Star Strider
Star Strider 2021년 9월 8일
It depends what the data are. If they are a matrix of values, then use contour with the matrix.
If they are random x and y values with associated z values (or alternatively grided versions of that), it would be straightforward to use griddata or scatteredInterpolant to create the matrices to use with contour. For gridded data, just use reshape on each column to create the matrices.
.

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by