export x and y data from a matlab plot into a matrix

回答 (3 件)

Honglei Chen
Honglei Chen 2012 年 2 月 16 日
編集済み: John Kelly 2014 年 5 月 27 日

0 投票

You need to access XData and YData property, for example:
h = plot(1:10);
get(h,'XData')
get(h,'YData')
Here is a handy tool to find out the handle graphics properties

1 件のコメント

Baba
Baba 2012 年 2 月 16 日
What if I don't have access to h? and just have a plot in front of me that pops up due to some code running?

サインインしてコメントする。

Image Analyst
Image Analyst 2012 年 2 月 16 日

0 投票

If it just recently popped up, and you can run some code to get to it before focus switches to some other figure, then you can use gca or gcf for the handle.

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2012 年 2 月 16 日

編集済み:

2014 年 5 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by