stringcellarray2charcell

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Artificial Intelligence
Introduced first in SolidGeometry 5.4, Creation date: 2023-12-11, Last change: 2025-08-19

converts xps cell list of string arrays into cell list of charchains

Description

RESULT IS LIKE: {'"space on a" "space on c" "a on b"' }

the current XPS format is a cell lits of string arrays that cannot be written in a n excel file without problems. Thid function converts the cell list of string arrays into a cell list of charchains

See Also: SGwritetable , array2tableTL , charcell2stringcellarray

Example Illustration

 missing image of stringcellarray2charcell(ops)

Syntax

zzz=stringcellarray2charcell(ops)

Input Parameter

ops:

Output Parameter

zzz:

Examples


[ops,start, goal]=XPSblocksworld
stringcellarray2charcell(ops); xlscell=ans
SGwritetable('test.xls',array2tableTL(xlscell,'ACTION','CONDITION','ADD_LIST','DEL_LIST'))




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, stringcellarray2charcell, is designed to convert a cell list of string arrays into a cell list of character chains. This conversion is necessary because the current XPS format, which is a cell list of string arrays, cannot be easily written into an Excel file without issues.

Input Parameters

Output

Algorithm Steps

  1. The function begins by determining the separator to use. It calls the getfuncparams function with the first element of varargin and a default value of " if varargin is empty.
  2. The input cell list ops is assigned to the output variable zzz.
  3. A loop iterates over each element of zzz (which is initially identical to ops).
  4. For each element, the function strarr2char is called. This function converts the string array into a single character chain, using the determined separator.
  5. The converted character chain replaces the original string array in zzz.

Example Usage

An example is provided in the comments:

[ops,start, goal]=XPSblocksworld
stringcellarray2charcell(ops,','); xlscell=ans
SGwritetable('test.xls',array2tableTL(xlscell,'ACTION','CONDITION','ADD_LIST','DEL_LIST'))

This example demonstrates how to convert a cell list of string arrays into character chains and then write the result to an Excel file using SGwritetable.

Algorithm explaination created using ChatGPT on 2025-08-19 07:28. (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