- 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
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Christopher Creutzig
am 31 Mär. 2014
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!