xpcells2strings

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-09-15

converts cell list of character chains into one charchain of quotation marks separated sentences

Description

RESULT IS LIKE: '"space on a" "a on table" "space on b" "b on table"'

This function may accelerate the XPSEQS concept at a later stage.
functions such as contains work on charchain level
contains(xpstrings2cells(zzz),unsortrows(xpstrings2cells('"c on table"'))')
functions such as ismember work on cell level

See Also: xpstrings2cells

Example Illustration

 missing image of xpcells2strings(ccc)

Syntax

sss=xpcells2strings(ccc)

Input Parameter

ccc: cell list of sentences such as [{'space on a'} {'a on table'}]

Output Parameter

sss: sentences separate by quotation marks

Examples


ccc=[{'space on a'} {'a on table'} {'space on b'}]
sss='"space on a" "a on table" "space on b" "b on table" "space on c" "c on table"'
xpcells2strings(ccc); sss=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, XPcells2strings, is designed to convert a cell array of character strings into a single string where each sentence is separated by quotation marks. It is part of the SolidGeometry library and was introduced in version 5.4.

Input Parameters

Output Results

Algorithm Steps

  1. The function takes the input cell array ccc.
  2. It uses the join function to concatenate the elements of ccc into a single string, with each element separated by " " (a space enclosed in quotation marks).
  3. The result of the join function is a cell array with one element, which is accessed using sss{1}.
  4. The sprintf function is then used to format this string by enclosing it in quotation marks, resulting in the final output sss.

Example

Given the input:

ccc = [{'space on a'} {'a on table'} {'space on b'}]

The function will produce the output:

sss = '"space on a" "a on table" "space on b"'

This function is useful for operations that require a single string format, such as when using functions like contains or ismember that operate on character chains or cell levels, respectively.

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