Matlab Extracting X and Y coordinates??

8 ビュー (過去 30 日間)
Kevin
Kevin 2014 年 8 月 12 日
コメント済み: Michael Haderlein 2014 年 8 月 13 日
Hi,
I have created an xy plot in Matlab but I was wondering if there is a quick and easy way of extracting all x and y points so I can recreate the graph on Excel?
Thanks, Kevin

回答 (2 件)

Image Analyst
Image Analyst 2014 年 8 月 12 日
There is nothing to "extract" since you already have them - you must have them if you plotted them. So just use xlswrite or activex to send them to Excel. Then have a plot already set up in Excel to look at some fixed range, or else have a macro embedded in the workbook that can do it, or else (hardest) use ActiveX to create one from scratch. If you use ActiveX, record a macro in Excel first and look at the course code to see what ActiveX commands you need to call.

Michael Haderlein
Michael Haderlein 2014 年 8 月 12 日
Some quick and dirty method is the variable editor. Double click on your x/y variables in the Workspace window and you will get the content shown in a spreadsheet. From there, you can simply copy-paste it into Excel.
  2 件のコメント
Kevin
Kevin 2014 年 8 月 13 日
Thanks for your comment. I have tried this but the workspace only saves the most recent entry and I need to use all x and y points. Any other ideas? Thanks.
Michael Haderlein
Michael Haderlein 2014 年 8 月 13 日
let's assume you have created your plot with
plot(x,y)
then double click on the x variable in the workspace, highlight all the values which appear and copy them to Excel. Do the same with the y values. What do you mean with most recent entry?

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

カテゴリ

Help Center および File ExchangeActiveX についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by