PLmeshgrid
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 4.0, Creation date: 2017-07-08, Last change: 2025-09-14
simple fnct for a better understand of meshgrid
See Also: VLmeshgrid
Example Illustration
Syntax
PL=PLmeshgrid(xx,yy)
Input Parameter
xx: | | list of x values |
yy: | | list of y values |
Output Parameter
PL: | | Point list of all mesh coordinates |
Examples
PLmeshgrid(1:3,1:2)
PLmeshgrid([0 15 25 35 45 55 65],0:8:8*22)
Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, PLmeshgrid, is designed to generate a list of points representing a mesh grid based on input vectors for x and y coordinates, and optionally z coordinates.
Input Parameters
- xx: A vector containing x values.
- yy: A vector containing y values.
- varargin: An optional parameter for z values. If not provided, z is set to 0.
Output
- PL: A matrix containing the list of all mesh coordinates. Each row represents a point in the mesh grid.
Algorithm Steps
- Initialize
zz to 0. If a third argument is provided and is not empty, set zz to this value.
- Use the
meshgrid function to generate matrices XL, YL, and ZL from xx, yy, and zz.
- Reshape these matrices into column vectors and concatenate them to form the matrix
PL.
- If only two input arguments are provided, adjust
PL to include only the x and y coordinates.
- If no output is requested, plot the points using
SGfigure and CVLplot. Adjust the view based on the number of input arguments.
Algorithm explaination created using ChatGPT on 2025-08-18 23:16. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21