how to acquire a value from workspace

i have a question about matrix value, if there is a point of an image and consist of x and y coordinates.
centroids = [x value, y value]
for example i got centroids = [300,400] %in workspace
nah, could i put the value into 2 different variables ? like x and y ? so x will contain 300 and y will contain 400 ?
i can do that manually,with click on the workspace and rename it, but could i do it with code ?

回答 (1 件)

David Young
David Young 2011 年 6 月 8 日

1 投票

x = centroids(1);
y = centroids(2);

1 件のコメント

danny agus
danny agus 2011 年 6 月 8 日
thx :)

この質問は閉じられています。

タグ

質問済み:

2011 年 6 月 8 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by