I need to create a vector of indices for x and y coordinates and save with assigned value
4 ビュー (過去 30 日間)
古いコメントを表示
I need to create a vector of indices that labels each point, for example point with index 1 that has x and y coordinates x(1), y(1) and save it into a vector such as points_index
x = [1.22, 2.33, 4.56]
y = [5.6, 7.3, 8.2]
points_index = [1 2 3]
any help is much appreciated thank you
3 件のコメント
Wan Ji
2021 年 8 月 27 日
I dont think I catch your idea. What is called 'look up', why not use x(i), y(i) to search the points you want?
回答 (1 件)
Chunru
2021 年 8 月 27 日
x = [1.22, 2.33, 4.56];
y = [5.6, 7.3, 8.2];
for i=1:length(x)
points(i).x = x(i);
points(i).y = y(i);
end
points(2)
6 件のコメント
参考
カテゴリ
Help Center および File Exchange で Time Series Events についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!