- You cannot plot two functions at the same time with ezsurf. Use two ezsurf calls and “hold on” instead.
- The input to ezsurf cannot have three variables (x, y, and n). Fix at least one of them.
Plotting complex functions with the Symbolic Math Toolbox
6 次查看(过去 30 天)
显示 更早的评论
How should i plot this function : z^(1/n) [ complex roots of z ] with ezsurf(), ezmesh(), ... ? In the official documentation is clearly stated that ezsurf() and ezsurfc() for example, do not accept complex inputs. I understand the trick is probably in using both real() and imag() functions, but even so, i can't get rid of the problem.
Also, i tried with :
>> syms x y n
>> z = x + i * y;
>> fz = z^(1/n);
>> ezsurf(simplify(real(fz)), simplify(imag(fz)))
And that's what i get from Matlab :
??? Undefined function or variable "h".
Error in ==> ezgraph3 at 66
hh = h;
Error in ==> ezsurf at 65
h = ezgraph3('surf',args{:});
Error in ==> sym.ezsurf at 60
ezsurf(char(f),varargin{:});
1 个评论
Christopher Creutzig
2014-3-31
What do you want to plot, exactly? Perhaps an animation which shows, for varying n, where the z are such that z^n=z0 for some fixed z0?
The code you posted has two problems:
Also note that z^(1/n) is exactly one complex value (in MATLAB, in SMT, and in many branches of mathematics), not a multi-valued function returning all n-th roots of z.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!