Syntax
T=XPSrulesread([fname])
Input Parameter
fname : | | filename to read from |
Output Parameter
Examples
[ops,start, goal]=XPSblocksworld; XPSruleswrite(ops,'TEST.XLS')
XPSrulesread(rname); ops=ans
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 function, XPSrulesread
, is designed to read rules from an Excel sheet and return them as a list. It is part of the SolidGeometry library and was introduced in version 5.4. The function is authored by Tim Lueth and is part of the VLFL-Lib, specifically under the class of Artificial Intelligence.
Input Parameters
- fname: This is the filename from which the rules are to be read. If not provided, the default filename used is 'XPSRULE.xls'.
Output Results
- T: This is the list of rules that are read from the specified Excel file.
Algorithm Steps
- The function begins by retrieving the filename using the
getfuncparams
function. If no filename is provided, it defaults to 'XPSRULE.xls'.
- The function then reads the table from the specified Excel file using the
SGreadtable
function. This table is converted from a character cell to a string cell array using the charcell2stringcellarray
function.
- The Excel file is opened by double-clicking it using the
openbydoubleclick
function.
- The function checks for any non-empty cells in the array
T
using the cellsize
function. It uses logical indexing to filter out any empty rows, ensuring that only rows with data are retained.
- The filtered list of rules is then returned as the output
T
.
This function is useful for reading and processing rules from an Excel file, which can then be used in various applications within the SolidGeometry library.
Algorithm explaination created using ChatGPT on 2025-08-18 22:52. (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