![func_sirf.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206087/func_sirf.png)
How to plot a 2d potential function
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MatlabEnthusiast
il 27 Feb 2019
Commentato: MatlabEnthusiast
il 27 Feb 2019
Hi all. Today I came across a function f(X,Y) = cos(2*pi*X)(1+3Y) + ((2*pi*y)^2)/2.
I thought this was a 3d function but apparently it's not. How do i plot this 2D function in MATLAB.
Is there a special function for handling potential functions in MATLAB? thank you very much
0 Commenti
Risposta accettata
Stephan
il 27 Feb 2019
Modificato: Stephan
il 27 Feb 2019
f = @(X,Y) cos(2*pi.*X).*(1+3.*Y) + ((2*pi.*Y).^2)/2
fsurf(f)
![func_sirf.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206087/func_sirf.png)
3 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!