
Nelson: Scientific Computing Environment Programming Language.
Nelson is an open-source scientific computing environment designed for numerical analysis, data visualization, and algorithm development.
Nelson provides mathematical functions, structured data types, and visualization tools for numerical computing workflows.
This documentation serves as your complete reference guide to Nelson's built-in functions, module system, and programming capabilities - from basic mathematical operations to advanced computational tasks.
Functions manager provides tools to manage and interact with Nelson's function search path and function types.
It includes commands to add or remove directories from the search path, execute built-in functions, clear built-in functions, evaluate functions, and more.
Utilities are available to check for the existence of built-in, macro, or mex functions.
The Modules Manager in Nelson provides the infrastructure to extend and manage the environment at runtime.
It allows modules to be dynamically added, removed, and queried, making the system flexible and adaptable to different workflows.
With support for both internal and external modules, the manager handles module metadata, paths, and versioning.
It also provides utilities for organizing user-defined toolboxes, managing gateways, and ensuring that dependencies are properly loaded.
This framework simplifies module distribution, integration, and maintenance, forming the backbone of Nelson’s modular architecture.
The Core module provides the fundamental building blocks of the Nelson environment.
It includes essential services for program execution, environment management, and system interaction.
Through this module, users can evaluate code dynamically, manage execution flow, query program state, and access key system information such as versioning, configuration, and licensing.
It also offers basic utilities for file identification, checksums, cryptography (the crypto namespace: hashes, HMAC, Ed25519 and X25519, Argon2, authenticated encryption and secure random), and terminal capabilities.
Together, these features form the foundation upon which all other modules and user-level functionality in Nelson are built.
The Engine module manages the execution environment of Nelson itself.
It provides mechanisms to handle program startup and shutdown behavior, command-line integration, and runtime modes.
This includes support for user-defined initialization and termination scripts, platform-specific system requirements, and interpreter directives for cross-platform script execution.
It serves as the core interface between Nelson and the underlying operating system, ensuring flexible configuration and smooth control over how the software is launched and operated.
The Interpreter Functions module provides the core language constructs and control mechanisms that define the execution flow in Nelson.
It includes essential elements such as loops, conditional branching, error handling, and function declarations.
The module also offers tools for parsing and analyzing code, working with keywords, and managing recursion limits.
Together, these features establish the fundamental syntax and semantics of the Nelson language, enabling users to write structured, dynamic, and reliable programs.
The Error Manager module provides the mechanisms for handling errors and warnings in Nelson.
It defines how exceptions are created, raised, and rethrown, as well as how diagnostic information can be retrieved after an error or warning occurs.
It lets programs control execution after failures, capture diagnostic reports, and display warnings without stopping execution.
It provides the common error and warning primitives used by Nelson code.
The Console module manages interaction with Nelson’s command window.
It provides tools to control the display, handle user input, and query terminal properties.
These features allow scripts and applications to communicate directly with the user through the console, making it easier to build interactive workflows and adapt output to the current terminal environment.
The Text completion module provides completion candidates for Nelson command lines, editors, and terminals.
The Display Format module defines how values, variables, and expressions are presented in Nelson.
It offers control over numeric formatting, text representation, and the way results are shown in the console.
The module also provides mechanisms for capturing formatted output programmatically, enabling both human-readable display and programmatic handling of results.
This ensures flexibility in how information is presented and reused within scripts and applications.
The Characters Encoding module provides tools for converting between native byte representations and Unicode characters.
It enables scripts to correctly interpret and manipulate text in various encodings, ensuring compatibility across different platforms and locales.
The module also detects character sets that match a given input for text processing and internationalization.
The Localization module manages language settings and internationalization in Nelson.
It provides mechanisms to query available languages, determine the current and default language, and change the interface language dynamically.
This module adapts Nelson to linguistic and regional settings and supports multilingual interfaces.
The i18n module provides tools for internationalization and localization of text within Nelson.
It retrieves translated strings for the current locale, provides utilities for translation workflows, and generates translation file headers.
This module helps developers create software that can adapt dynamically to multiple languages and cultural contexts.
The Types module provides tools for managing and inspecting data types in Nelson.
It provides functions to query variable types, distinguish numeric, logical, string, and object values, and work with specialized types such as sparse or integer arrays.
The module also supports creation of objects and validation of variable names, helping ensure type safety and consistency across scripts and functions.
For C++ extension and embedding code, see C++ value API.
The Logical Type module provides tools for working with Boolean values and logical operations in Nelson.
It enables the creation, conversion, and manipulation of logical data, supporting fundamental logical operations that are essential for control flow, conditional evaluation, and decision-making in scripts and programs.
The Single Type module provides tools for handling single-precision numeric values in Nelson.
It enables conversion of variables to single-precision format, allowing efficient storage and computation while maintaining sufficient numeric accuracy for many applications.
The Double Type module provides tools for handling double-precision numeric values in Nelson.
It enables conversion to double precision and offers access to key numeric limits, supporting high-accuracy computations and reliable handling of large or small floating-point numbers in mathematical and scientific applications.
The Integer Types module provides tools for working with signed and unsigned integers of various sizes in Nelson.
These types are particularly useful for efficiently storing and processing large datasets, such as images or large numeric arrays.
The module supports conversions between integer formats and provides access to the minimum and maximum values representable for each integer type, ensuring safe and precise integer arithmetic.
The Sparse Type module provides tools for creating and manipulating sparse matrices in Nelson.
It supports efficient storage and computation for matrices with a large number of zero elements, including conversion between sparse and full representations, generation of special sparse matrices, and access to nonzero elements.
This module enables memory-efficient handling of large datasets and optimized numerical operations on sparse structures.
The String Type module provides functions for creating, manipulating, and analyzing text in Nelson.
It supports conversion between character arrays and string arrays, concatenation, trimming, justification, and case conversion.
The module also includes functions for searching, matching, replacing, and formatting strings, enabling flexible text processing for both simple and complex string operations.
Functions for creating text, formatting text, and converting between text and other data.
Functions for checking text type, length, and character properties.
Functions for locating, counting, erasing, and replacing text.
Pattern-building functions and boundary definitions for text matching.
Regular expression search, replacement, translation, and pattern helpers.
Functions for extracting parts of text and combining or splitting text values.
Functions for trimming, padding, inserting, reversing, and changing text case.
The Function Handle Type module provides tools for creating and managing function handles in Nelson.
It supports anonymous functions, conversion between strings and function handles, and verification of function handle objects.
This module enables flexible and dynamic function invocation, allowing functions to be passed, stored, and executed programmatically.
The Handle module provides tools for creating and manipulating handle objects in Nelson.
Handle objects are lightweight references to larger data structures, enabling efficient memory management and data sharing between different parts of a program.
This module includes functions for creating, copying, and destroying handle objects, as well as for managing their lifetimes and ensuring proper cleanup.
It also includes classdef reflection, event, listener, dynamic property, weak reference, and typed invalid handle helpers.
The Data Structures module provides tools for creating, manipulating, and inspecting arrays, cells, and structures in Nelson.
It enables conversion between different data formats, access and modification of fields, application of functions to array elements, and organization of structured data.
This module handles complex data through programmatic operations and dynamic data management.
The Dictionary module provides tools for working with key-value mappings in Nelson.
It supports creation and configuration of dictionaries with defined key and value types, querying and modifying entries, and managing the overall structure.
This module enables efficient storage, retrieval, and manipulation of data indexed by unique keys, making it ideal for associative arrays, lookups, and dynamic data management.
The Tables module provides tools for creating, accessing, and manipulating tabular data in Nelson.
Tables are array-like structures with named variables (columns), each capable of holding different data types.
Table metadata is available through T.Properties, and helper functions are provided for adding, moving, renaming, removing and summarizing variables.
Timetables store tabular variables together with row times and provide time-based sorting, retiming, synchronization, and range queries.
Functions for creating tables and timetables and converting between tabular and other data forms.
Functions for table size, type checks, and quick previews.
Functions and topics for accessing, sorting, rearranging, and customizing table contents.
Functions for combining tables with joins and related operations.
Functions and topics for direct calculations and applying functions to table rows or variables.
Functions for timetable ranges, events, synchronization, and retiming.
The Categorical module provides arrays whose elements belong to a fixed set of text categories.
The Overloading module provides mechanisms for customizing the behavior of functions and operators in Nelson.
It defines how standard operations or built-in functions behave when applied to user-defined types or objects.
This capability enables the extension of Nelson’s language features, supporting more natural and expressive use of custom data structures.
The Operators module provides tools for performing arithmetic, logical, relational, and array operations in Nelson.
It supports element-wise and matrix computations, concatenation, subscripted referencing and assignment, and short-circuit logical operations.
This module enables flexible manipulation of data structures and numerical arrays, forming the foundation for both basic calculations and advanced mathematical expressions.
The Constructors module provides tools for creating fundamental numeric values, scalars, vectors, and matrices in Nelson.
It includes constants, identity and diagonal matrices, and special values such as infinity, NaN, and machine precision.
This module forms the basis for initializing data structures and performing mathematical and numerical computations.
The Elementary Functions module provides fundamental mathematical operations and matrix manipulations in Nelson.
It includes numeric computations, array and matrix operations, complex number handling, rounding and scaling, and various utility functions for querying properties of arrays and matrices.
The module also supports construction of special matrices, grids, and sequences, enabling robust and efficient implementation of mathematical algorithms and numerical analyses.
Functions for creating, reshaping, and arranging arrays.
Elementary numerical functions, norms, rounding, powers, roots, logarithms, and remainders.
Functions for complex values and real-valued variants of elementary functions.
Functions for numeric base conversion, type conversion, and byte order.
Functions for generating special matrices.
Functions for indexing, dimensions, shape checks, rearrangement, and structural predicates.
The Trigonometric Functions module provides functions for trigonometric calculations in Nelson.
It includes standard trigonometric functions such as sine, cosine, and tangent, as well as their inverses and hyperbolic counterparts. The module supports angle measurements in both degrees and radians, allowing for flexible computations based on user preferences.
The module also provides utilities for converting between degrees and radians in mathematical and engineering calculations.
The Special Functions module provides tools for performing advanced mathematical operations in Nelson.
It includes functions for statistical distributions, combinatorial calculations, and other specialized mathematical computations that are essential in various scientific and engineering applications.
This module enhances Nelson's capabilities by offering a range of functions that support complex analyses and modeling tasks.
The Linear Algebra module provides matrix and vector computation functions in Nelson.
It includes functions for matrix factorization, decomposition, inversion, and analysis, as well as operations on eigenvalues, singular values, and subspaces.
The module includes numerical methods for evaluating matrix properties, condition numbers, and transformations used in linear algebra problems.
Functions for solving, analyzing, and measuring linear systems and vector or matrix quantities.
Matrix factorization and plane rotation functions.
Functions for eigenvalue, singular-value, and Schur computations.
Functions that evaluate elementary functions on matrices.
Functions for condition estimates, structure checks, and matrix properties.
Iterative solvers for linear systems.
The Statistics module provides tools for analyzing and summarizing data in Nelson.
It includes functions for computing measures of central tendency, variability, correlation, and probability distributions.
The module also supports advanced data summarization structures for accurate quantile estimation, enabling robust statistical analysis and interpretation of datasets.
Functions for summarizing, exploring, ranking, and visualizing statistical data.
Distribution functions for density, cumulative probability, inverse probability, fitting, likelihood, random sampling, and summary statistics.
Statistical tests for distribution fit, location, variance, ranks, independence, and comparisons.
Analysis of variance functions.
Regression, correlation, and supervised prediction functions.
Classification model functions and helpers for grouped data.
Unsupervised learning, nearest-neighbor search, outlier handling, and sequence model functions.
Functions for dimensionality reduction, factor analysis, feature ranking, and low-rank representations.
Functions for experimental design and model configuration.
The Data Analysis module provides tools for performing numerical and array-based analyses in Nelson.
It supports cumulative operations, sorting, aggregation, convolution, and identification of unique or missing values.
This module supports processing, summarization, and exploration of datasets for computational and analytical tasks.
The ODE Solvers module provides time integration functions for explicit, stiff, and implicit differential equation workflows in Nelson.
It includes solver entry points, delay and boundary value problem wrappers, option handling, interpolation, solution extension, event detection, and object-oriented problem definitions.
When the optional SUNDIALS backend is built, the object workflow can also select CVODES and IDAS solver values.
The module is designed for numerical experiments, simulations, and teaching examples that need compact solver setup and reproducible result objects.
Tutorial pages cover solver choice, events, tolerances, mass matrices, implicit equations, delay equations, boundary value problems, interpolation, extension, object workflows, and complex states.
| Area | Main entries |
|---|---|
| Initial value problems | ode23, ode45, ode78, ode89, ode113, ode15s, ode15i |
| Delay and boundary value problems | dde23, ddesd, ddensd, bvp4c, bvp5c |
| Utilities | odeset, deval, odextend, ode, odeEvent, odeSensitivity |
The Polynomials module provides tools for creating, manipulating, and analyzing polynomials in Nelson.
It supports polynomial evaluation, differentiation, integration, fitting, root finding, and matrix polynomial operations.
This module enables efficient handling of polynomial expressions for mathematical modeling, curve fitting, and numerical analysis.
The Geometry module provides tools for performing geometric transformations and computations in Nelson.
It supports rotation operations in three-dimensional space, convex hulls, Delaunay triangulations, Voronoi diagrams, spatial searches, and scattered data interpolation.
This module is useful for applications in computer graphics, robotics, computational geometry, interpolation, and spatial analysis.
The Control System module provides algorithms and tools for designing, analyzing, and tuning linear control systems in Nelson.
It supports state-space and transfer function models, system transformations between continuous and discrete time, and computation of poles, zeros, and frequency responses.
The module also includes system balancing, controllability and observability analysis, regulator and estimator design, and simulation of dynamic responses.
These tools are used to model, analyze, and control linear dynamic systems in engineering and research code.
Functions for creating, inspecting, and reducing dynamic system models.
Functions for model conversion, composition, selection, and interconnection.
Functions for time-domain, frequency-domain, and model-response analysis.
Simulation and response functions for dynamic systems.
Functions for controller design, estimators, and regulator computations.
Control-oriented matrix computations for state-space analysis.
The SLICOT module provides advanced numerical algorithms for computations in systems and control theory.
It includes tools for matrix factorization, system balancing, stability analysis, pole assignment, and solutions of Lyapunov, Riccati, and Sylvester equations.
The module supports both continuous- and discrete-time systems, including descriptor and multi-input systems, enabling precise and efficient analysis, design, and control of complex dynamic systems.
The Signal Processing module provides tools for analyzing, filtering, transforming, and resampling sampled signals in Nelson.
It includes windowing functions, FIR and IIR filter design, digital filtering, zero-pole and second-order-section conversions, cross-correlation, and conversions between magnitude, power, and decibel representations.
The module also supports multirate processing, spectral estimation, time-frequency analysis, waveform generation, and common signal measurements.
Functions for creating, resampling, smoothing, filtering, and preparing signals.
Signal measurements, features, and quality metrics.
Transforms, correlation estimates, coherence, and transfer-function estimates.
Filter design, analysis, conversion, and implementation functions.
Power spectrum, window, and scale-conversion functions.
Short-time and time-frequency representation functions.
The FFTW module provides tools for computing fast Fourier transforms in Nelson.
It supports one-dimensional, two-dimensional, and multidimensional transforms, as well as inverse transforms and frequency-domain manipulations.
The module enables efficient spectral analysis and signal processing, leveraging high-performance algorithms for both real and complex data.
The Random module provides tools for generating random numbers and random sequences in Nelson.
It supports uniform and normal distributions, random integer generation, permutations, and control over the random number generator state.
This module is essential for simulations, probabilistic modeling, and stochastic computations.
The OS Functions module provides tools for interacting with the operating system in Nelson.
It includes functions for querying system information, managing environment variables, executing shell commands, generating GUIDs, and performing platform-specific operations.
This module lets Nelson scripts interact with the operating system on Windows, macOS, and Linux/Unix platforms.
The File and Folder Functions module provides tools for managing files, directories, and paths in Nelson.
This module supports navigation of the file system, creation and removal of files and directories, querying file and folder properties, building and resolving paths, and handling platform-specific separators.
This module enables efficient and cross-platform file system operations within Nelson scripts and applications.
The File Archiver module provides tools for compressing and decompressing files in Nelson.
It supports creation of zip archives and extraction of files from zip archives, enabling efficient file storage, sharing, and management.
The Memory Manager module provides tools for managing variables and memory in Nelson.
It supports variable creation, assignment, querying, and removal across different scopes, as well as handling global and persistent variables.
The module also supports memory inspection, variable locking, and listing of workspace contents for controlled memory usage in scripts and applications.
The Time Functions module provides tools for working with dates, times, and durations in Nelson.
It supports querying the current time, measuring elapsed time, performing calculations on dates and times, converting between different time representations, and handling calendar-specific operations such as leap years and month-end calculations.
This module enables precise time management, scheduling, and performance measurement in scripts and applications.
Functions for creating date and time values and alternate date representations.
Functions for fixed-length and calendar-based durations.
Functions for extracting and splitting date and time components.
Functions for date shifts, differences, ranges, and elapsed time.
Predicates and query functions for date, time, duration, and timezone data.
Conversions between date and time values, text, and external numeric time systems.
Timer objects, scheduling, waits, and timing utilities.
Time series, time series collections, events, metadata, and related operations.
The Stream Manager module provides tools for managing input and output streams in Nelson.
It supports reading and writing text and binary data to files, handling file positions, detecting end-of-file conditions, and managing file errors.
The module also supports session logging and workspace load/save operations for controlled file I/O in scripts and applications.
The HDF5 module provides support for working with Hierarchical Data Format (HDF5) files in Nelson.
It creates datasets, reads and writes data and attributes, and inspects file contents.
In addition to standard HDF5 support, it includes utilities for Nelson's native .nh5 format, enabling users to save, load, and inspect workspace variables efficiently.
This module is essential for managing large, structured, and portable scientific data.
The MATIO module reads and writes MAT-files, a format used by several numerical computing environments for storing numerical data.
It enables Nelson to check MAT-file validity, load and save workspace variables, and inspect file contents.
This module supports data exchange between Nelson and MAT-file-compatible environments in scientific and engineering workflows.
The XML module provides functions to create, convert, and manage XML documents for Nelson.
The JSON module provides functions to encode, decode, and format JSON data, allowing easy exchange of structured information between Nelson and external systems.
JSON (JavaScript Object Notation) is a lightweight, text-based data format widely used for transmitting attribute-value pairs and arrays.
This module enables Nelson to interoperate with web services, configuration files, and applications that rely on JSON.
The Parquet module provides local file support for Apache Parquet data sets.
It reads and writes column-oriented tables, exposes file metadata, and provides datastore and row-filter helpers for workflows that process one or more Parquet files.
Supported table variables include logical values, integer types, single and double precision floating point values, text, datetime values, duration values, nested tables stored as struct columns, and homogeneous primitive cell vectors stored as list columns.
The Spreadsheet module provides functions for reading and writing tabular data from and to text-based spreadsheet formats, such as CSV and delimiter-separated files.
It supports importing into various data types like numeric arrays, cell arrays, and tables, as well as exporting them back to files.
This enables smooth interaction with spreadsheet software (Excel, LibreOffice Calc, etc.) and data exchange between applications.
In the world of parallel computing, the Message Passing Interface (MPI) is the de facto standard for implementing programs on multiple processors.
This module provides functions to initialize, manage, and finalize MPI environments, as well as to perform communication between processes, both point-to-point and collective.
It enables Nelson programs to run efficiently on distributed-memory systems and clusters.
Note: MPI support is not available on Windows on ARM64 (woa64) architecture.
The parallel module provides tools for running computations asynchronously in the background, managing task scheduling, and retrieving results.
It enables Nelson programs to execute functions concurrently, improving efficiency and responsiveness by offloading work to background workers.
The ipc module provides basic tools for interacting with processes and enabling communication between them.
It allows retrieving process identifiers and using a communicator object for exchanging information across Nelson processes.
The audio module provides functions for reading, writing, analyzing, and playing audio files.
It supports playback control through the audioplayer object, manipulation of playback properties, and metadata handling.
It also includes utilities for signal conversion and sound generation.
The History Manager module in Nelson provides tools to access and manage the command history of your session.
It records previously executed commands, recalls them for reuse, and keeps command history organized.
The GUI module provides functions to create and interact with graphical user interface components, dialogs, and application windows.
The QML Engine module allows Nelson programs to display, manipulate, and interact with graphical content using Qt's QML framework.
It provides functions to manage QML components, access Qt objects, and integrate JavaScript and QML logic.
The Text Editor module provides an embedded Nelson editor for creating, editing, and formatting Nelson scripts and files.
The graphics module provides functions for creating, customizing, and managing plots, figures, colormaps, and graphical objects.
It includes 2-D and 3-D visualization, user interaction tools (zoom, pan, rotate), and utilities for working with colors, legends, axes, and text annotations.
Functions grouped by visualization type, including lines, distributions, discrete data, polar plots, contours, vector fields, surfaces, volumes, polygons, and animation.
Functions for line plots, function plots, and plots with error bars.
Functions for creating and configuring polar plots.
Functions for contour computation, contour plots, and contour labels.
Functions for histograms, scatter plots, distribution charts, and data summary visualizations.
Functions for vector fields and stream visualizations.
Functions for bar charts, stem plots, pie charts, and other discrete data displays.
Functions for surfaces, meshes, volumes, filled areas, and polygon graphics.
Functions for animated plots and dynamic point updates.
Functions and reference pages for graphics object management, layout objects, user interface objects, and object properties.
Functions for creating, finding, querying, clearing, and closing graphics objects.
Functions for arranging multiple plots and working with tiled layouts.
Functions for user interface controls, menus, and context menus.
Reference pages for visible graphics object properties, supported value types, and property actions.
Functions for labels, annotations, axes appearance, colors, interaction, camera views, and lighting.
Functions for axis limits, ticks, grids, boxes, and aspect ratios.
Functions for colors, colormaps, color limits, color order, and rendering style.
Functions for creating, selecting, and listing colormaps.
Functions for interactive graphics, callbacks, camera views, and lighting.
Functions for titles, axis labels, legends, color bars, text, and annotations.
Functions for displaying images, converting frames, and playing recorded frames.
The Graphics I/O module provides functions for importing, exporting, and managing graphical content and image formats.
It supports reading and writing image files, copying figures, and saving plots in various file formats for interoperability with other applications.
The Image Processing module provides operations for manipulating images and volumes, including type conversion, color conversion, contrast adjustment, filtering, morphology, connected components, region measurements, geometric transforms, resizing, rotation, feature detection, foundational 3-D processing, and image registration.
Help pages are grouped into topic chapters: image basics, image analysis and segmentation, and geometry, registration, and 3-D processing.
Functions for image classes, color spaces, contrast adjustment, thresholding, filtering, padding, and edge detection.
Functions for image type conversion, color space conversion, and indexed image conversion.
Functions for contrast adjustment, threshold selection, histogram analysis, and binary image creation.
Functions for spatial filtering, Gaussian and median filtering, padding, filter kernels, and edge detection.
Functions for morphology, connected components, boundary tracing, region measurements, reconstruction, and segmentation.
Functions for binary and grayscale morphological operations, object cleanup, border cleanup, and structuring elements.
Functions for connected components, labels, region measurements, selection, and boundary tracing.
Functions for segmenting images using region growing, active contours, morphological reconstruction, h-minima/maxima, regional extrema, imposed minima, and watershed transforms.
Functions for corner metrics and local feature point detection.
Functions for geometric transforms, spatial referencing, image registration, volumetric filtering, resizing, and 3-D measurements.
Functions and objects for cropping, resizing, rotation, translation, spatial referencing, and geometric transforms in 2-D and foundational 3-D workflows.
Functions for filtering and processing volumetric image data.
Guides and entry points for aligning images, estimating registration transforms, and applying registered outputs.
The WebTools module provides functions to interact with web resources, transfer data via URLs, and work with RESTful web services.
The WebView module opens local HTML, inline HTML text, web addresses and the examples gallery from Nelson.
The Dynamic Link module enables Nelson to build, load, and call C/C++ and Fortran code at runtime.
It supports generating gateways, loaders, and managing shared libraries for integration with external compiled code.
By default, Nelson does not try to detect a C/C++ compiler on Windows. Do not forget to run 'configuremsvc' or 'configuremingw' once.
The MEX module allows C/C++ code to interface with Nelson and access Nelson's engine, variables, and functions.
The F2C module allows Nelson users to convert legacy Fortran 77 source files into C code.
This lets older Fortran routines compile, execute, and interact with Nelson variables from Nelson workflows.
It is particularly useful for leveraging existing numerical algorithms or legacy scientific codebases within a modern Nelson environment.
The Validators module provides tools for enforcing constraints and verifying input values in Nelson.
It supports checking data types, numerical properties, matrix and vector dimensions, text validity, file and folder existence, and logical or numeric conditions.
This module ensures robust input validation, helping to prevent errors, enforce correctness, and improve the reliability of scripts and functions.
The Python Engine module lets Nelson call Python code and use Python libraries alongside Nelson functions.
It provides functions to run Python code, manage interpreter environments, and exchange data between Nelson and Python.
The Julia Engine module lets Nelson call Julia code and use Julia numerical libraries from the Nelson environment.
It provides functions to run Julia code, manage interpreter environments, and exchange data between Nelson and Julia.
The GPU engine module runs array computations on the GPU through WebGPU (Dawn), portably on Windows, Linux and macOS without a proprietary CUDA dependency.
Arrays are moved to the device with gpuArray and back to the host with gather. Operators and many functions are overloaded so that expressions on a gpuArray run on the device and keep their result device-resident.
Device arrays are stored in single precision (WebGPU has no double compute type yet); real, logical and complex data are supported. Use canUseGPU to check availability and gpuDevice to inspect the selected device.
Many functions are supported on a gpuArray: the operators, the element-wise math functions (including the rounding and hyperbolic/inverse-trigonometric ones), the reductions and scans (sum, prod, mean, var, std, cumsum, cumprod, sort, find), the complex-extraction functions, the shape and predicate functions, and the constructors zeros/ones/rand/randn through the 'gpuArray' / 'like' forms. Call gpuArrayFunctions for the exact, always-current list.
The Debugger module in Nelson provides functions to inspect and analyze program execution.
It is designed to help users identify errors, trace the flow of execution, and better understand the state of variables during runtime.
Text editor debugging features integrate with these functions for interactive debugging.
The Profiler module in Nelson provides functions to measure and analyze the execution performance of code.
It helps users identify bottlenecks, optimize slow parts of programs, and improve overall efficiency.
The Test Manager module in Nelson provides tools for automated testing of code, enabling users to validate functionality, ensure correctness, and manage test cases efficiently.
This module supports creating reference outputs, running test suites, and conditionally skipping tests.
The assert_functions module provides assertion tools for unit tests, runtime contracts and diagnostic checks.
All assertions share the same contract: with no output they raise an error on failure; with outputs they return [res, msg].
The canonical API uses qualified assertion names, for example asserts.isequal, asserts.warning and asserts.satisfies.
The Help Tools module provides functions to create, convert, and manage documentation for Nelson.
It generates help content in formats such as HTML, Markdown, PDF, and website-ready output for maintaining and distributing documentation.
The Optimization module provides scalar minimization, unconstrained minimization, zero finding, nonlinear equations, nonlinear least squares, nonnegative least squares, quadratic programming, solver options, and a first problem-based modelling layer.
The implemented algorithms are deterministic dense numerical methods intended for small and medium-size engineering models in Nelson.
The nflow_blocks module provides the simulation blocks used by NFlow, including their ports, parameters, phases, and runtime behavior.
NFlow is currently released as 1.0.0-beta.1: it is functional and tested, but details of its interfaces and file format may still evolve based on feedback.
Acausal (physical) blocks with undirected pins, simulated natively through the differential-algebraic engine.
Acausal (physical) blocks with undirected pins, simulated natively through the differential-algebraic engine.
Acausal (physical) blocks with undirected pins, simulated natively through the differential-algebraic engine.
Acausal (physical) blocks with undirected pins, simulated natively through the differential-algebraic engine.
Acausal (physical) blocks with undirected pins, simulated natively through the differential-algebraic engine.
Stateful continuous-time blocks updated with the simulation step.
Interactive dashboard widgets that bind to signals and parameters to observe or drive a running model.
Sampled blocks that store values, histories, or discrete states.
Blocks that import, execute, or compile Functional Mock-up Units and models.
Boolean and comparison blocks for numeric signals.
Interpolated and direct lookup-table blocks (1-D, 2-D, n-D and direct).
Algebraic scalar math operations.
Blocks with saturation, thresholds, hysteresis, or rate limits.
Blocks that consume, display, or name signals.
Blocks that generate signals from parameters, time, labels, or files.
Blocks that evaluate user-provided expressions or Nelson functions.
Blocks for routing, grouping, annotation, and interactive switching.
Programmatic creation and editing of nflow block-diagram models.
NFlow is currently released as 1.0.0-beta.1: it is functional and tested, but details of its interfaces and file format may still evolve based on feedback.
The NFlow FMI module imports Functional Mock-up Units (FMUs) that follow the FMI 3.0 standard and runs them as Co-Simulation or Model Exchange components.
NFlow is currently released as 1.0.0-beta.1: it is functional and tested, but details of its interfaces and file format may still evolve based on feedback.
It reads the model description of an FMU, exposes its variables and interfaces, and either drives a fixed-step Co-Simulation (the FMU owns its solver) or integrates a Model Exchange FMU with NFlow's own solver, recording the FMU outputs over time.
Functions accept either a .fmu archive or an already-extracted FMU directory. Archives are unpacked with a ZIP-slip-hardened extractor into a temporary directory that is removed automatically.
The same import also backs two blocks in the NFlow editor (category FMI): an FMU block (Co-Simulation) and an FMU (ME) block (Model Exchange, whose continuous states join the diagram's global solver). Drop a block, click Browse FMU... to pick a .fmu, and its input and output ports are configured automatically from the model description. Ready-to-open demo diagrams for several reference FMUs (VanDerPol, BouncingBall, Dahlquist, StateSpace, Feedthrough) ship in the module examples directory.
| Area | Main entries |
|---|---|
| Model description | fmiInfo |
| Co-Simulation | fmiCoSimulate |
| Model Exchange | fmiModelExchange |
| Modelica bridge | modelicaInfo, modelicaConfigure, modelicaToFmu |
| FMU import assistant | fmuToBlock |
The FMU import assistant (fmuToBlock) turns any FMU into a native-looking nflow block -- input and output ports from the model description, parameters, and the FMU icon -- ready to drop into a library. It pairs with the Modelica bridge: modelicaToFmu produces an FMU, fmuToBlock wraps it as a block.
The Modelica bridge lets an nflow model include a modelica block that references a Modelica model. At simulation time the model is compiled to an FMU with a user-installed OpenModelica and imported through the FMI path above, so physical (acausal) Modelica models simulate alongside ordinary blocks. modelicaInfo and modelicaConfigure report and select the OpenModelica used; modelicaToFmu performs the compilation. Worked examples (RC, RLC, mass-spring-damper) ship in the module examples/modelica directory.
The nflow editor is Nelson's block-diagram environment for building and simulating dynamic systems.
It provides a visual editor for wiring blocks and subsystems, saving and loading diagrams in the .nflow JSON format, and running simulations with either the fixed-step engine or the variable-step (CVODES) solver, with zero-crossing detection for discontinuous blocks.
Diagrams can also be turned into standalone C or Rust code through the code generator.
NFlow is currently released as 1.0.0-beta.1: it is functional and tested, but details of its interfaces and file format may still evolve based on feedback.
The optional compiler module analyzes dependencies and builds native applications from .m files.
Use ncc to load the module on demand. compiler.build provides console and no-console standalone builds, shared options and read-only results with runtime dependency tables. The nelson.compiler interfaces retain the existing bundled-runtime path. Tutorials cover multiple functions, embedded data and both build interfaces.