Is there a way to create a matrix off the grid boxes of a gridded image on a gui?
Show older comments
Is there a way to do this? I have a gridded image on a gui. The user can fill in the grid boxes on the gui, and now I have to save the graph as a matrix text file.
Save the grid as a NxM zero-matrix (you know the dimension of your grid). Consider each box in your grid as a index of the matrix. Initially all boxes are unclicked by the user and hence all indices are zero. But when user clicks on a box, that corresponding matrix index will be 1 and all others still 0. Once you get the matrix, you can just write it in a text file. So basically the the text file will be a NxM matrix of 0s and 1s - representing the grid.
Answers (1)
Image Analyst
on 10 Jun 2013
0 votes
Why can't you just use imwrite() or fprintf()? Type alt-PrintScreen to copy a screenshot to the clipboard, and then upload a screenshot to help explain better what is going on to http://snag.gy
Categories
Find more on Annotations 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!