storing of values in matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
0 Kommentare
Akzeptierte Antwort
Paulo Silva
am 18 Mär. 2011
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 Kommentare
Matt Fig
am 18 Mär. 2011
No, Paulo... I was joking with you because these questions are all the same.
Paulo Silva
am 18 Mär. 2011
tell that to the OP :) I just answered the best I could to the questions :s
Weitere Antworten (1)
Matt Fig
am 18 Mär. 2011
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)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!