Labeling a Piece of Data

8 views (last 30 days)
Tyler
Tyler on 5 Oct 2012
I imported a txt file which gave me two columns. Well the top left number needs to be give a label/name(need to display and label it). How would I go about doing this? I have only had matlab for about 3 days. I have gained a slight grasp, but not even close to using it effectively obviously.
Thanks in advance.

Answers (1)

Walter Roberson
Walter Roberson on 5 Oct 2012
There is no way to label or name a number in MATLAB. MATLAB numeric arrays are purely numeric.
Perhaps you are looking for MATLAB's dataset objects?
Or perhaps you are looking to display the numbers as text in the command window, with a header line (or header column) ?
Or perhaps you are looking to make a table in a graphics window, such as with uitable()?
Or perhaps you are wanting to generate an HTML table from the numbers and view it in a browser?
  5 Comments
Walter Roberson
Walter Roberson on 6 Oct 2012
I would call that an annotation rather than a label, but the difference between those is admittedly not clear.
Image Analyst
Image Analyst on 6 Oct 2012
Edited: Image Analyst on 6 Oct 2012
See my edit where I added the label code at the end. It should be clear that that is a label.

Sign in to comment.

Categories

Find more on Develop uifigure-Based Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!