필터 지우기
필터 지우기

How to sample data from a plot to a function.?

조회 수: 1 (최근 30일)
roro6992
roro6992 2013년 8월 22일
Hi evryone, Can you tell me if there is any way to obtain a discrete set of data points from a plot and use those data points later in a function. Suppose i hv a function 'Flow_inlet' in which i hv to feed data of Outlet flow at diff time instants and i have a plot of Output flow vs. time. Now how can i feed the data from the curve to the function. If it cud be done anyway then how?? Plzz enlighten me.Really need ur help. Thnxx in advance!!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 22일
Click on your plot then type
x= get(gco,'xdata')
y=get(gco,'ydata')
  댓글 수: 1
roro6992
roro6992 2013년 8월 22일
Thanxx a lot for ur suggestion. But is there any way by which i can obatin any n no. of data points from the plot? And to to use this code in my function do i have to click on the plot first and then run the function?? plz suggest.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by