Filter löschen
Filter löschen

How to find the X- and Y- axis interecpt of this plot in Matlab?

1 Ansicht (letzte 30 Tage)
Ved
Ved am 19 Nov. 2013
Beantwortet: Walter Roberson am 19 Nov. 2013
Please consider this sample code:
a=2.3;b=5.3; % constants
n=1000; % number of data blocks
data=a+(b-a)*rand(1,3500); % data points
count=0;
x=[1:.1:7]; % x-axis
bins=hist(data,x);
for i=length(x):-1:1
count=count+bins(i);
ccdf(i)=count/n;
end
semilogy(x,ccdf) % CCDF of data
My question is that if we could find and mark the Y-axis intercept.
I can use the * Data Marker * option in Matlab Figure to mark the X & Y axis values but is there any other way to do so?

Antworten (1)

Walter Roberson
Walter Roberson am 19 Nov. 2013
The Y axis intercept of a log plot... so in other words the place where the y data would equal 1 ?
If so then because y represents the cumulative distribution, y would be 1 at the right hand edge of the distribution, the end-point of where the distribution becomes defined. Which would be "b" in your code.

Kategorien

Mehr zu 2-D and 3-D Plots 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!

Translated by