Find gradient ascent for 3D surface
Mostra commenti meno recenti
- I have a 3D surface (x,y,z) plotted using the following code (excel sheet attached):
clear; clc; clearvars;
% Read table:
T = readtable('full-nov26th.csv');
rows = (T.(3)== 3);
T = T(rows, :);
% Define Variables
x = T.(1);
y = T.(2);
z = T.(4);
xi = linspace(min(x),max(x), 200);
yi = linspace(min(y),max(y), 200);
[X,Y] = meshgrid(xi,yi);
Z = griddata(x,y,z,X,Y);
surf(X,Y,Z);
- The generated surface looks as follows:

- I am trying to plot a line that incrementally goes from the starting point (0,0,14.19) to the highest point on the surface.
- I have seen other answers on the forums dealing with analytical functions. However, in here, I only have the surface generated from points. Hence, how could I be able to do it from these points?
Risposta accettata
Più risposte (1)
Alan Weiss
il 28 Nov 2021
0 voti
You might be interested in this example: Pattern Search Climbs Mount Washington
Alan Weiss
MATLAB mathematical toolbox documentation
Categorie
Scopri di più su Surface and Mesh 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!

