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

Walter Roberson
Walter Roberson 2019년 7월 4일
Please post the complete error message
Alex Mcaulley
Alex Mcaulley 2019년 7월 4일
This code works:
example.jpg
Walter Roberson
Walter Roberson 2019년 7월 4일
I suspect that the poster has shadowed a function. The complete error message would help us track it down.
Yash Mistry
Yash Mistry 2019년 7월 4일
편집: Yash Mistry 2019년 7월 4일
Sorry for not posting this earlier, I have attached the full error message below.
>> gyroid
Warning: Error updating ImplicitFunctionSurface.
Too many output arguments.
Using
dbstop if warning
might help you track down the problem.
Yash Mistry
Yash Mistry 2019년 7월 5일
편집: Yash Mistry 2019년 7월 5일
I tried to run the same command on my co workers computer and the program run fine, i think there is some probelm with my MATLAB can you guys please suggest solution to it.
Program - fimplicit3(@(x,y,z) sin(x).*cos(y) + sin(y).*cos(z) + sin(z).*cos(x))
Error message in my MATLAB -
Warning: Error updating ImplicitFunctionSurface.
Too many output arguments.
IT RUN PERFECTLY FINE ON OTHER MATLAB.
Walter Roberson
Walter Roberson 2019년 7월 5일
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] = matlab.graphics.internal.prepareDefaultErrorCallbackWarning(evt);
stack = dbstack('-completenames');
if (size(stack,1) == 1)
warningstatus = warning('OFF', 'BACKTRACE');
warning(id, msg);
warning(warningstatus);
else
warning(id, msg);
end
end
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.
Walter Roberson
Walter Roberson 2019년 7월 5일
At that point it would be useful to see the contents of the stack variable.

댓글을 달려면 로그인하십시오.

답변 (1개)

SaiDileep Kola
SaiDileep Kola 2019년 7월 19일

0 개 추천

fimplicit3(@(x,y,z) sin(x).*cos(y) + sin(y).*cos(z) + sin(z).*cos(x))
Hi,
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

Walter Roberson
Walter Roberson 2019년 7월 19일
The warnings the user was getting suggests there is some shadowed function or a corrupt MATLAB installation. They were already doing the fimplicit3.
madhan ravi
madhan ravi 2019년 7월 19일
Second sir Walter’s comment.

댓글을 달려면 로그인하십시오.

카테고리

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

제품

태그

질문:

2019년 7월 4일

댓글:

2019년 7월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by