Quantcast
Channel: PTC Community : Discussion List - PTC Mathcad
Viewing all articles
Browse latest Browse all 2936

Function to convert a string into a vector of characters

$
0
0

A function to convert a string, or vector of character codes, into a vector of characters.

 

 

This is a function I have found useful on several occasions.  An example is counting successive sequences of characters in a string (eg, for run length encoding).   A recent Community task was to count sequences of numbers in a vector, for which the function seqcount was created.   Counting characters in a string can be done using char to convert a string to a vector of characters and then applying seqcount to that vector.

 

 

 

Stuart


Viewing all articles
Browse latest Browse all 2936

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>