storing of values in matlab

x=get(h,'Xdata')
y=get(h,'Ydata')
plot(x,y)
can we do any operation on x,y after plotting?
how can we catch the values of y at different x values?

 채택된 답변

Paulo Silva
Paulo Silva 2011년 3월 18일

0 개 추천

x and y are variables, in that case they are vectors 1xn columns, you can do many operations to them.
x and y have the same size, x(1) and y(1) correspond to the first point and so on until x(end) and y(end)

댓글 수: 4

Matt Fig
Matt Fig 2011년 3월 18일
Easy points for you today, Paulo! Let's see if you can get all three of these on the exact same subject!
Paulo Silva
Paulo Silva 2011년 3월 18일
I don't care about the points, if you want I just delete easily all my accepted answers from today!
Matt Fig
Matt Fig 2011년 3월 18일
No, Paulo... I was joking with you because these questions are all the same.
Paulo Silva
Paulo Silva 2011년 3월 18일
tell that to the OP :) I just answered the best I could to the questions :s

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

추가 답변 (1개)

Matt Fig
Matt Fig 2011년 3월 18일

0 개 추천

You need to stop posting many questions on the exact same subject, take a deep breath, and figure out exactly what you are trying to do. We cannot read your mind. What does it mean to "catch the values of y at different x values"?? You have x and y, so if you want to look at them instead of plot them, do this:
[x;y]
If that isn't what you want, clarify with very descriptive words!
.
.
EDIT
Perhaps you mean that you want a function which will return the y for a given x?
f = @(X) interp1(x,y,X,'nearest');
f(x(1)) % Should return y(1)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

태그

Community Treasure Hunt

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

Start Hunting!

Translated by