Syntax
[nh]=ELhistogram(EL,[])
Input Parameter
Output Parameter
[nh] : | | list of [nodenumber usage] |
Examples
A=SGbox; ELofFL(A.FL); EL=ans, view(-30,30); ELhistogram(EL)
Copyright 2023-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 algorithm is designed to analyze an edge list (EL) and determine the frequency of each node's occurrence within that list. The function is part of the SolidGeometry library and is used to generate a histogram of node usage.
Input Parameters
- EL: The edge list, which is a list of connections between nodes.
- varargin: Additional optional parameters that can be passed to the function, though not explicitly used in this code.
Output Results
- nh: A list containing pairs of node numbers and their corresponding usage counts.
Algorithm Steps
- Identify unique nodes in the edge list using the
unique
function, which returns a list of unique node identifiers.
- Determine the number of unique nodes using
numel
, which counts the elements in the list of unique nodes.
- Initialize a zero vector
ht
of the same size as the list of unique nodes to store the usage count for each node.
- Iterate over each unique node:
- For each node, count its occurrences in the edge list using
find
and numel
, and store this count in the corresponding position in ht
.
- Combine the list of unique nodes and their usage counts into a single matrix
nh
.
- If no output is requested (i.e.,
nargout==0
), generate a plot:
- Create a new figure using
SGfigure
.
- Plot the edge list using
ELplot
.
- Set the view angle of the plot to (-30, 30) using
view
.
Algorithm explaination created using ChatGPT on 2025-08-18 22:41. (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