coordinate data in the text command
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
Accepted Answer
0 votes
Share a link to this answer
- Write a wrapper function that will split your vector as approriate.
- Use a comma separated list: loc=[0.5;0.5];loc=num2cell(loc);text(loc{:},'a')
13 Comments
Share a link to this comment
- It did not explain, that one vector with two elements in the first position did not cover the requirements of text
- It did not explain, that {:} makes comma separated numbers that were exceptable to the command.
Share a link to this comment
- ans = 1
- ans = 2
- ans = 0.6719
Share a link to this comment
- s.a returns a comma separated list, just like loc{:} did, so it equivalent to:
- s(1).a , s(2).a , s(3).a
- If you execute that line of code, what do you expect the output to be? Exactly: three lines of ans.
Share a link to this comment
Share a link to this comment
- a comma separated list of variables assigned to a cell array, will assign each variable between each of the commas into a separate element of the cell array e.g. a={1,2,3,....}
- a cell array inserted into a Matlab command will insert all cells in a row, as a comma separated list of its elements
Share a link to this comment
Share a link to this comment
- I used writing for may be a better word might be "assigning a value to a variable" e.g. a=1
- I used reading for replacing the "value of a variable" by the "variable"
Share a link to this comment
More Answers (1)
0 votes
Share a link to this answer
1 Comment
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)