필터 지우기
필터 지우기

Error in contour dependent on number of specified levels

조회 수: 1 (최근 30일)
Robert
Robert 2012년 9월 14일
I have a matrix named ch1 that contains no inf or nan elements. The matrix has the X label time, and Y label marks. When I try to make a contour plot using:
contour(time,marks, ch1,15,'fill','on');
I get the following error:
Error using patch
Color value contains NaN, or element out of range 0.0 <= value <= 1.0
Error in specgraph.contourgroup/refresh>LdrawFilled (line 403)
cu=patch(xp,yp,clev,'FaceColor','flat','UserData',lev,patchpairs{:});
Error in specgraph.contourgroup/refresh (line 207)
LdrawFilled(this);
Error in specgraph.contourgroup/schema>LdoDirtyAction (line 265)
refresh(h);
The error disappears if I specify 16 or 20 levels rather than 15, but I still get the error when specifying 14 or 10 levels. There is no dependence on XData, YData, or the filled option. This must be some kind of bug in contour, since the error is dependent on the number of contour levels. I could provide the offending matrix if anyone is interested.

답변 (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