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

 missing image of PLmeshgrid(xx,yy)

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

Output

Algorithm Steps

  1. Initialize zz to 0. If a third argument is provided and is not empty, set zz to this value.
  2. Use the meshgrid function to generate matrices XL, YL, and ZL from xx, yy, and zz.
  3. Reshape these matrices into column vectors and concatenate them to form the matrix PL.
  4. If only two input arguments are provided, adjust PL to include only the x and y coordinates.
  5. 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