- volumeviewer or underlying functionality can be called directly in very recent releases
- vol3d v2 from File Exchange
- scatter3 and encode the value by color or size
Surface plot generation for a 3-variable function
10 views (last 30 days)
Greetings, Could you please advise how to generate a surface plot for a 3- variable function. (The meshgrid and function are working properly but the surf() function keeps throwing out error and no graph appears)
Also Could you let me know how to plot surf(u,w,g) and surf (v,w,g) in separate graphs.
Walter Roberson on 8 Apr 2019
surf can only be used for rectangular (2d) data arrays.
For 3d data arrays your choices include
VBBV on 3 Jun 2023
Try to use a for loop to plot the resulting expression in 3rd dimension as shown below since surf function plots 2D matrices only
for k = 1:length(size(z,3))