Picking out stage coordinates using sscanf
Show older comments
Hi, I have a string where X&Y stage coordiantes are concatenated together with a comment.
-1042,7953**Tile1
so X=-1042, Y=7953, Comment=Tile1
I've trying to use sscanf to decompose these back to X, Y and comment:
num=sscanf(txtline, '%f,%f%s')
However its not appearing to give me what I need. Perhaps the occurance of the minus sign is messing things up. The problem is, is that either of the numbers can be positive or negative (positive appears with no prefix, negative appears with a '-').
Thanks for any advice
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!