Treatment G-code file
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Bjorn Gustavsson
il 8 Giu 2020
1 voto
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
Categorie
Scopri di più su Language Support in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!