plot based on Table
Show older comments
I have a table like this
id nodeName longitude Latitude
'0' 'Sydney1' '151.20732' '-33.86785'
'1' 'Brisbane2' '153.02809' '-27.46794'
'2' 'Canberra1' '149.12807' '-35.28346'
that contain id of Nodes, Nod names and geographical longitudes and Latitudes.
now i want to have graph that be ecording to longitude and Latitude and also show the nod names as label of Nodes in plot. but i cant.
3 Comments
Cris LaPierre
on 31 Jan 2021
Why not? What error message are you getting? Share the code you are using.
M Abedi
on 1 Feb 2021
Walter Roberson
on 1 Feb 2021
NodeCell2 = cell{1,4};
NodeCell2{1} = str2double(all_ids);
NodeCell2{2} = categorical(all_names);
NodeCell2{3} = str2double(all_longs);
NodeCell2{4} = str2double(all_lats);
scatter(NodeCell2{3}, NodeCell2{4});
text(NodeCell2{3}, NodeCell2{4}, NodeCell2{1}); %you might need string(NodeCell2{1}))
Accepted Answer
More Answers (0)
Categories
Find more on Geographic Plots 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!