How to extract numeric values from char
Show older comments
I have 9*1 column cell C. Here is the contents:
{'{"name":"rect","x":101,"y":30,"width":239,"height":244}'}
{'{"name":"rect","x":503,"y":88,"width":124,"height":165}'}
{'{"name":"rect","x":123,"y":78,"width":93,"height":111}' }
{'{"name":"rect","x":386,"y":47,"width":105,"height":112}'}
{'{"name":"rect","x":582,"y":40,"width":100,"height":113}'}
{'{"name":"rect","x":169,"y":50,"width":187,"height":209}'}
{'{"name":"rect","x":563,"y":49,"width":131,"height":181}'}
{'{"name":"rect","x":414,"y":128,"width":47,"height":53}' }
{'{"name":"rect","x":315,"y":131,"width":26,"height":33}' }
Each cell reprsents a rectangular bounding box defineds by its top-left corner coordinate and width and height. Then I want to extract from the 9*1 cell array these bounding box information (x, y, w, h) into a numeric matrix 9*4. How to do so?
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings 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!