필터 지우기
필터 지우기

How are the levels for the lines in the contour() function choosen

조회 수: 1 (최근 30일)
cbrysch
cbrysch 2016년 8월 18일
답변: cbrysch 2016년 8월 19일
I am using the contour function to analyze my data (2D matrix). For that I want to draw one contour line using the contour function with
Contourline=contour(MyData,1);
However, I am wondering now what exactly this contour line represents, meaning what is the algorithm that specifies where this contour line is drawn. The documentation only says that the contour levels are chosen automatically but not exactly how.

채택된 답변

cbrysch
cbrysch 2016년 8월 19일
I was also asking this Question on Stack.Overflow where it got answered by Suever:
As far as how MATLAB selects the levels when you specify the number of levels, it creates equally spaced levels between the minimum and maximum of the input data using the following formula:
minimum = min(real(double(data(:)));
maximum = max(real(double(data(:)));
tmp = linspace(minimum, maximum, nLevels + 2);
levels = tmp(2:end-1);

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by