using fimplicit with an equation
Show older comments
I am trying to create a plot of a 3D implicit function given by :
sin(x + y) + sin(x − y) + sin(y + z) + sin(y − z) + sin(x + z) + sin(x − z) = 0.
The code i have tried so far is:
%this is an mfile that explores and plots a given 3D implicit function %using the fimplicit command x=[-1:0.0001:-0.0001,0.0001:0.0001:1]; y=[-1:0.0001:-0.0001,0.0001:0.0001:1]; z=[-1:0.0001:-0.0001,0.0001:0.0001:1]; fimplicit3(sin(x+y)+sin(x-y)+sin(y+z)+sin(y-z)+sin(x+z)+sin(x-z)=0)
This gives me the error code 'the expression on the left of the equals sign is not a valid target for assignment.
Removing the =0 gives me the following string of errors:
Error using nargin Argument must be either a character vector or a function handle.
Error in matlab.graphics.function.ImplicitFunctionSurface>getFunction
Error in matlab.graphics.function.ImplicitFunctionSurface/updateFunction
Error in matlab.graphics.function.ImplicitFunctionSurface/set.Function
Error in matlab.graphics.function.ImplicitFunctionSurface
Error in fimplicit3>singleFimplicit (line 182) hObj = matlab.graphics.function.ImplicitFunctionSurface(fn,extraOpts{:},args{:});
Error in fimplicit3>@(f)singleFimplicit(cax,f,limits,extraOpts,args) (line 146) hObj = cellfun(@(f) singleFimplicit(cax,f,limits,extraOpts,args),fn,'UniformOutput',false);
Error in fimplicit3>vectorizeFimplicit (line 146) hObj = cellfun(@(f) singleFimplicit(cax,f,limits,extraOpts,args),fn,'UniformOutput',false);
Error in fimplicit3 (line 120) hObj = vectorizeFimplicit(cax,fn,limits,extraOpts,args);
Error in fimplicit (line 6) fimplicit3(sin(x+y)+sin(x-y)+sin(y+z)+sin(y-z)+sin(x+z)+sin(x-z))
Any guidance on this command or perhaps a different command i should be using would be much appreciated
Answers (0)
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!