supp:octave:contrib:surface_plot:start
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
supp:octave:contrib:surface_plot:start [2016/04/14 09:09] – created admin | supp:octave:contrib:surface_plot:start [2016/04/14 09:12] (current) – [Partial Solution] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Octave: Surface, Contour (Isolines), Gradient ====== | ====== Octave: Surface, Contour (Isolines), Gradient ====== | ||
+ | |||
+ | ===== Functions of Two Variables ===== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | In Octave analyse the function f(x,y) = x^2*y - 2*y. | ||
+ | |||
+ | * Understand what a meshgrid is, how it is generated and how it is used.\\ Define x=[-2: | ||
+ | |||
+ | * Define Z=(X.^2).*Y-2*Y; | ||
+ | |||
+ | * Generate a contour plot in the second figure window. | ||
+ | |||
+ | * Use the function [dX,dY] = gradient(Z); | ||
+ | |||
+ | * Open a third figure window. Add a contour plot, hold the plot, and add a vector arrow plot (octave buit-in function quiver).\\ How are contour lines and gradient vectors related? | ||
+ | |||
+ | ==== Solution ==== | ||
Download the script by klicking on the file name in the box header. Execute the file in Octave. Compare the results with the gradients determined in the lecture. | Download the script by klicking on the file name in the box header. Execute the file in Octave. Compare the results with the gradients determined in the lecture. |
supp/octave/contrib/surface_plot/start.1460624977.txt.gz · Last modified: 2016/04/14 09:09 by admin