Why does the CONTOURF function permit only two output arguments instead of three?

In MATLAB 7.0 (R14), the CONTOURF function no longer seems to work with three output arguments specified. For example, the following code:
[C,h,Cf]=contourf(peaks);
produces the following error:
??? One or more output arguments not assigned...
The documentation on CONTOURF indicates that three output arguments can be specified.

 채택된 답변

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0 (R14) in the way that the CONTOURF handles three output arguments.
To work around this issue:
1) Open contourf.m using the following command in the MATLAB Command Window:
edit contourf
2) Save a backup of the function as 'countourf.old' and close it.
3) Reopen contourf.m using:
edit contourf
4) Change the first line of the file to:
function [cout,hand,cf] = contourf(varargin)
5) Save the file.
The CONTOURF function should now behave as described in the documentation.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by