0

How can I extract data in a vector from semilogx figure? I am using bode plot to identify a system transfer function so I need the two vectors coming from semilogx graph to compare slope and identify system from approximate solution.

Is there any other method to do this identification?I wanna get the slope of this figure so i need xy data from this figure

Rowida
  • 1
  • 1
  • Neither the input nor the expected result are clear. Please provide demo plotting code [in the body of the question](http://stackoverflow.com/posts/42976475/edit). – Dev-iL Mar 23 '17 at 17:24

1 Answers1

0

Why are you asking specifically semilogx plot? When you get the data from a figure, you access the data directly as in here. What am I missing here?

hc=get(gca,'children');
data=get(hc,{'xdata','ydata'});
x=data{1};
y=data{2};
Community
  • 1
  • 1
Ozcan
  • 726
  • 4
  • 13
  • your code give data i already had , i want data from the figure as i think semilog creates a function between x and y and i do not have that function ( it is different using semilog than plot) @Ozcan – Rowida Mar 24 '17 at 14:49