Treatment G-code file
Afficher commentaires plus anciens
Hello,
I have a G-code file as you can see in the following structure :

How I can with matlab to find the number of rows which carry the character of Z and to copy the instructions between two defined rows in another file .txt.
Thank you
Réponse acceptée
Plus de réponses (1)
Bjorn Gustavsson
le 8 Juin 2020
1 vote
Maybe the easiest way it to loop through the text line-by-line and check if it contains the character 'Z' using strfind or findstr. Then it should be perfectly straightforward to keep the indices where you find your Zs.
HTH
Catégories
En savoir plus sur Language Support dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!