필터 지우기
필터 지우기

How to extract data from MATLAB figures to plot in OriginPro

조회 수: 11 (최근 30일)
Zain Ul Abideen
Zain Ul Abideen 2021년 3월 11일
댓글: darova 2021년 3월 20일
I have some data which comes from some graphs similar in shape to normal distribution curve. I have a MATLAB code which analyzes these graphs, find the peak position of each graph, and then plot the data of the peak positions and save the peak positions graph as a .fig file similar to the attached file.
But I want to get this peak positions data and want to plot in OriginPro. Can anyone help me how to extract this data? I found some solutions on the internet but those solutions only work for the simple graphs.

답변 (1개)

Jin Wang
Jin Wang 2021년 3월 12일
Hi,
For you case, you can try.
uiopen('figure.fig');
axes = gca;
dataObj = axes.Children; %give you the object containing data, if there are multiple lines, dataObj will be an array.
xData = dataObj.XData;
yData = dataObj.YData;
  댓글 수: 1
darova
darova 2021년 3월 20일
Hi Jin Wang,
Thank you very much for your reply. I ran the above code. It is extracting some data but how can I save it in excel file using the above code?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by