using fimplicit function to plot
Mostra commenti meno recenti
I'm trying to make a plot using the fimplicit function but the figure is empty.
zf(1) = figure(1);
za(1) = axes;
c = -4:2:4;
fimplicit(@(x,y) y.^2 - x.^2- c);
Risposta accettata
Più risposte (1)
John D'Errico
il 2 Ott 2020
Modificato: John D'Errico
il 2 Ott 2020
As an alternative to the use of fimplicit, you can simply think of this as a contour plot. That is essentially all fimplicit does.
c = -4:2:4;
fxy = @(x,y) x.^2 - y.^2;
H = fcontour(fxy,[-5,5, -5,5],'LevelList',c);

Either way works. A contour plot has the virtue that you can create all level lines in one call and no need to loop.
Categorie
Scopri di più su Line Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
