last day (15 days later) » 

4:14 PM
1
A: How to find x-value of highest peak in histogram?

AdamfileID = fopen('q65.txt','r'); formatSpec = '%f'; file = fscanf(fileID,formatSpec) h = histogram(file,50); %Find index of maximum [~, index]= max(h.Values); delta = h.BinLimits(2)-h.BinLimits(1); % find the range for a single bin slot = delta./h.NumBins; %location = minimum y + (index of maxmi...

 
I don't know why it shows different numbers than the histogram
a more simple one gives another result, also differerent from the graph
 
upload your file document, I will check it for you
 
leteckaposta.cz/187079771 in this way or could we go to discussion? The maximum peak is 0,42 - 0,43
 
I got location = [0.4022 , 0.4233]
I updated my answer, copy it exactly into your matlab and check the answer
 
Thank you for you help. It works now
Can I have next question?
 
4:15 PM
okay
 
I have a vector with values

0.4000 0.4604

How to connect points with y value for instance 5 and x values of vector? I mean [0.4 0.46] using a vector and lets say y variable.

a
y = 5
 
define clearly your x and y values
 
x1 value is in the first component of vector a, x2 value is in the second component of vector a and y1=y2 are y=5 - it is defined
 
4:39 PM
What's the dimension of x?y?
 
4:49 PM
1
I am sorry 2
one point is [0.4,5] and the second one [0.4604,5]
 
5:46 PM
x = [0.4, 0.46]; y = [5, 5]; then plot(X, Y)
 
5:58 PM
this is false? plot([a b], [193 193])
nothing happened
Thank you very much
 

last day (15 days later) »