MATLAB Answers


Too many output argument

Yash Mistry 님이 질문을 제출함. 4 Jul 2019
최근 활동 madhan ravi 님이 댓글을 추가함. 19 Jul 2019
Hi, I am trying to plot a 3D gyroid using the following code
fimplicit3(@(x,y,z) sin(x).*cos(y) + sin(y).*cos(z) + sin(z).*cos(x))
but it shows me too many output argument as the error. Also a bank 3D plot opens up with only X Y Z axis.
Can you help?

  댓글 수: 9

표시 이전 댓글 수: 6
What happened when you tried the dbstop if warning ?
function defaulterrorcallback(~, evt)
% The default value for ErrorCallback properties.
% Copyright 2009-2017 The MathWorks, Inc.
[id, msg] =;
stack = dbstack('-completenames');
if (size(stack,1) == 1)
warningstatus = warning('OFF', 'BACKTRACE');
warning(id, msg);
warning(id, msg);
Warning from defaulterrorcallback (line 9)
warning(id, msg);
Sorry for this messy reply, I dont really understand but i have copy pasted whatever it showed me on my matlab.
Thank you so much.
At that point it would be useful to see the contents of the stack variable.

로그인 to comment.



답변 수: 1

fimplicit3(@(x,y,z) sin(x).*cos(y) + sin(y).*cos(z) + sin(z).*cos(x))
This function doesn’t show any error and gives as gyroid as shown in figure, store it to a handle as
fh = fimplicit3(@(x,y,z) sin(x).*cos(y) + sin(y).*cos(z) + sin(z).*cos(x));
Before doing this clear all variables stored in your workspace, change settings on MATLAB to default
Plot looks like

  댓글 수: 2

The warnings the user was getting suggests there is some shadowed function or a corrupt MATLAB installation. They were already doing the fimplicit3.
Second sir Walter’s comment.

로그인 to comment.

Translated by