f

#### Get x values for specific y value of the histogram

```I have the histogram of an image and I want to know the x values that corresponds to specific y values.
For example I want the x values that corresponds to the values that I stored in an array A.

P.S: the x values of histogram are 0:255 (for Matlab is 1:256) and the y values can be any number from 0 to hundrends

``` 0 10/20/2009 1:23:01 AM comp.soft-sys.matlab  211265 articles. 25 followers. 0 Replies 908 Views Similar Articles

[PageSpeed] 18 Similar Artilces:

How to get a value(z) from a specific location(x,y) on the surf in matlab
For example: [x,y]=meshgrid(1:5:50,1:5:50); % there is a gap in the sequence: 1 6 11 ... not 1 2 3 ... z = peaks(10); % or some other function tri = delaunay(x,y); % create triangulation trisurf(tri,x,y,z) % displaying the data on the surf. <a href="http://tinypic.com?ref=spx3eb" target="_blank">surface plot sample</a> Question: I would like to store the value of the surface (z) for each location (x,y), something like image data/matrix is there a built-in function to get the from the surface ? Thanks for your kind help. Sincerely, Darlis After some searching and reading, I think I've found the solution of my problem with the matlab built-in griddata() function. [xq,yq]=meshgrid(1:50,1:50); zq = griddata(x,y,z,xq,yq); CMIIW. Sincerely, Darlis "Darlis Herumurti" <darlis.herumurti@gmail.com> wrote in message <lbgvrn\$jku\$1@newscl01ah.mathworks.com>... > For example: > > [x,y]=meshgrid(1:5:50,1:5:50); % there is a gap in the sequence: 1 6 11 ... not 1 2 3 ... > z = peaks(10); % or some other function > tri = delaunay(x,y); % create triangulation > trisurf(tri,x,y,z) % displaying the data on the surf. > > <a href="http://tinypic.com?ref=spx3eb" target="_blank">surface plot sample</a> > > > Question: > I would like to store the value of the surface (z) for each location (x,y), something like image...

Histogram of ROI-Get a specific x-axis value from this histogram
Hi, In a grayscale image I, i first find the mean and then i create a new matrix: B=mean-I; I generate the histogram of this new matrix with hist(B) and this has of course positive and negative values. The first part of my question is whether i can create a histogram for a specific area of interest of the initial image, with some kind of mask. I thought to use the royfilter2 and wrote in MATLAB: I=imread('img.png'); BW=I>10; fun=@stats; im=roifilt2(I,BW,fun); And here comes the second part of my question. I want to segment the darker points in my image. So, i am looking for the specific positive value of the x axis of the histogram for which there is high frequency starts to happen. This value i want to use as a thresholding value.In general, how to get the specific value of the x axis of a histogram,for which a statement is true? The function in is a separate stats.m file and would be more or less like this function y=stats(x) m=mean(x(:)); vec=mean-double(x); hist(vec); %here,get from histogram %the value T that i %am interested in.how? x(find(m-x>T)) =1; x(find(m-x<T)) =0; y=x; Thank you in advance ...

obtaining values of y at specific values of x on a fig
please i want to know how to obtain the values of y at specific values of x on a fig between x and y ...

Plot same X values on x-axis with multiple Y values on the same graph
Does anyone know to plot an xy graph similar to the attached screen done in Excel? Preferably continuous plotting xy values WITHIN a loop like an updating time chart. &nbsp; Thanks sameXvalmultipleYgraph.JPG: http://forums.ni.com/attachments/ni/170/242290/1/sameXvalmultipleYgraph.JPG napview: Thank you very much for getting back with me. How are you generating the X array of data?. I would like to know the logic behind the data so that I can implement in LabVIEW. Histograms by nature do not have that type of patterns in the numbers. Regards, Rudi N. Rudi, You can open the attached vi 8...

v(x,y)=obj(x,y).value for x=1..n and y=1..n
I have an object-array obj(x,y) with the proerty 'value' i.e. obj(x,y).value I'd like to convert it into an array v(x,y), so that v(x,y)=obj(x,y).value for x=1..n and y=1..n so that I can create a mesh graph of v(x,y). Any suggestions are much appreciated. thanks ...

Find Y values from a given X values
I've a set of experimental data which has a like Gaussian profile. I want to find the values of X or (index) for Y0 (Y maximum), Y0/10, Y0/20... Y)/90 like that from the raw data. Y0 and its index can be found from the 'max' function, but corresponding to Y0/10, Y0/20 and all there are no discrete X values. The X values have to come from interpolated data. The "interp1" option doesn't work since it gives Y for a given x. I need the reverse. Thanks in advance "josevm" wrote in message <k9hurn\$iki\$1@newscl01ah.mathworks.com>... > I've a set of experimental data which has a like Gaussian profile. I want to find the values of X or (index) for Y0 (Y maximum), Y0/10, Y0/20... Y)/90 like that from the raw data. Y0 and its index can be found from the 'max' function, but corresponding to Y0/10, Y0/20 and all there are no discrete X values. The X values have to come from interpolated data. The "interp1" option doesn't work since it gives Y for a given x. I need the reverse. Thanks in advance Interchange the roles of X and Y in the call to interp1: xi = interp1(Y,X,yi); Best wishes Torsten. "Torsten" wrote in message <k9i3a8\$2nv\$1@newscl01ah.mathworks.com>... > "josevm" wrote in message <k9hurn\$iki\$1@newscl01ah.mathworks.com>... > > I've a set of experimental data which has a like Gaussian profile. I want to find the values of X or (index) for Y0 (Y maxi...

How to spot maximum x value AND corresponding y value?
Dear IDLers, I'm an IDL beginner, new to this forum and I stuck on the following issue =85 I have an input file (ascii) containing coordinate data (three columns; x, y, z). I want to compute a vector from one point to another. I know the vector should go from the maximum x value to the minimum y value (or vice versa). I took the FLOAT function to find out the min and max values. But how can I find out the corresponding x and y values for my y_min and x_max values? Many thanks in advance. Cheers, Markus On Feb 16, 10:23=A0am, "M." <markus_men...@yahoo.de> wrote: > I ...

Plot 1 X-value, multiple Y-values
Hello everyone,i cannot figure out how to make a graph from a file that is organised in this way:X-values:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Y1&nbsp;&nbsp; &nbsp;&nbsp; Y2&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; Y3&nbsp;&nbsp; &nbsp;&nbsp; ...0&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 1&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 4&nbsp;&nbsp; &...

To find y-value if x-value is given in a plot
After making a plot, how do I create MATLAB code to provide me with a value of y if x is given as a fix number. Assume y has a complicated expression that can't be simply inversed (in order to get x). For example: x=1:70; y=1-[1:70]/70; % Plotting position formula semilogy(sort(x),y) % If x is 50, y=? %This is my interest Thank you. "Zahiraniza Mustaffa" <zahiraniza.nospam@mathworks.com> wrote in message <fe2gh1\$jh\$1@fred.mathworks.com>... > After making a plot, how do I create MATLAB code to > provide me with a value of y if x is given as a fix >...

Count where value in A = X & value in B = Y
Hi. I want to count every instance where the value in column A is X AND where the value in column E is Y. So for example, if there are 10 cells in col A that equal "pacman", and of those, 3 have dates within the specified range, the the final cell value should be 3. The only way I've done this so far is on a field by field basis - =IF(AND([Opened.xls]Sheet1!\$A1="pacman", [Opened.xls]Sheet1!\$E1>DATEVALUE("2005/3/18"), [Opened.xls]Sheet1!\$B1<DATEVALUE("2005/3/24")), 1, 0) ....Then if I copy this formula into a long string of cells and sum it, I do indeed get the correct total, but I would like to find a single formula that can be placed in one cell gives me the total for all values, instead of having to copy this formula into hundred of cells, total them, and then change it in all those cells if it needs modification. Thanks in advance for you help! Jeff Correction to a typo and a bit more info: In the formula above, the \$B was supposed to be another \$E. Here it is corrected (and simplified by removing the file name): =IF(AND(Sheet1!\$A1="pacman", Sheet1!\$E1>DATEVALUE("2005/3/18"), Sheet1!\$E1<DATEVALUE("2005/3/24")), 1, 0) ....As I said, this formula is accurate but only on a per cell basis. In order to get a single cell formula that could handle a whole column, I tried: =SUM(IF(AND(Sheet1!\$A1:\$A100="pacman", Sheet1!\$E1:\$E100>DATEVA...

Getting value of x at y max
Hi, I need a solution for a simple question... I have plotted (x,y) and I want the value of x at y=max(y)... can u please tell me the command or code? [maximumy,i] = max(y); % i is the index of your max y values wantedx = x(i); "Karthik Mani" <karthmani@gmail.com> wrote in message <he184v\$74m\$1@fred.mathworks.com>... > Hi, I need a solution for a simple question... I have plotted (x,y) and I want the value of x at y=max(y)... can u please tell me the command or code? "Mostafa Abd El Meguid" <motafa@gmail.com> wrote in message <he1cbu\$i9\$1@...

find x value given y value tia sal22
Greetings All I'm trying to adapt some code to find all x values given/knowing all the y values. It works but on certain y values it creates multiple x values does anyone know how I can fix this. Example code: % find x values clear,clc; x_1=[]; x=0:0.1:5; x=x'; y=(x - 2.5) .^ 2 + 3; % Plot it in a new figure window. plot(x,y); % Find out the min y using the min function. % (This is how halee Rustumani says he does it). yMin = min(y); yMax = max(y); ylim([0 yMax]); % Set axis min and max. for i=1:length(y) indexAtMin = find(y == y(i,1)); xAtMin = x(index...

Finding the x value where a y value crosses a threshold in a chart
When creating a plot of a curve derived from measurements, I need to find the x value for the point where the curve goes above a given value on the y axis (e.g. 50) - or at least the closest x value for the next y value above that crossing . Judging from the LabView documentation, the limit test vis do not give the x value I need. How can i accomplish that? Maybe this can be done using MathScript? The Threshold 1D Array function will do that, assuming your data is monotonically increasing. There exists an example for what you would like to do. &nbsp; Under the Help Menu, do a search for...

finding a Y value on a plot from a specified X value (GUI)
I have 3 plots on my GUI. The 1st and 2nd plot share the same Yaxis. The 2nd and 3rd plot share the same Xaxis. The user will choose the X-value in the 1st plot and the program will then display the corresponding Y-value. From this Y-value, it will need to display the corresponding X-value on the 2nd plot. From this new X-value, it will need to display the corresponding Y-value on the 3rd plot. Basically, from the X-value on the 1st plot, I need to find the Y-value on the 3rd plot. If there is a graphical way to display this (drawing lines on my plots in my GUI), that would be ideal. ...

Given Y-Axis value, Find X-Axis value
I have a list of X data and Y data. Next I plot a curve using these X & Y data points. Now, I have a given Y-data point, how can I find X-Axis value. (Note: the Y-Axis value is a calculated value, which means it doesn't have a exact value that matches the Y-Axis data) I've tried to use interp1 function, but this function is "With X value, find Y", whereas my case is "With Y value, find X" A simple way is to use Data Cursor icon, but I prefer to use a more accurate method. Please advise. On 10/25/2015 9:59 PM, Chee Keong wrote: > I've tr...

To find max and min x-value if y-value is given in a plot
Dear all, Hope you can help me. I made a plot (unstationary signals). There is a y-value and I want to know the corresponding x-values under equation unknown. In my mind, it looks like there is a y-value threshold line in my plot, and I want to get the min and max x-value. cheers, popo "Yu-po " <1b2e3a4r@gmail.com> wrote in message <id8lvj\$moj\$1@fred.mathworks.com>... > Dear all, > > Hope you can help me. > > I made a plot (unstationary signals). There is a y-value and I want to know the corresponding x-values under equation unknown. In my mind, it looks like there is a y-value threshold line in my plot, and I want to get the min and max x-value. > > cheers, > popo Hi, If you made the plot, then you must have the data in your MATLAB workspace. You can just use max() to find both the maximum y-value and the index of that value. You can then query which x-value corresponds to that index. Wayne "Yu-po " <1b2e3a4r@gmail.com> wrote in message <id8lvj\$moj\$1@fred.mathworks.com>... > Dear all, > > Hope you can help me. > > I made a plot (unstationary signals). There is a y-value and I want to know the corresponding x-values under equation unknown. In my mind, it looks like there is a y-value threshold line in my plot, and I want to get the min and max x-value. > > cheers, > popo ------------------------- you can use this code i=find(max(y)); %or...

How to make Matlab output the x and y coordinates of a 2D plot's maxima, for which the y coordinate is greater than a certain user specifiable value
Can anyone suggest a Matlab script/command(s) that would make Matlab output the x and y coordinates of a 2D plot's maxima, for which the y coordinate is greater than a certain user specifiable value? Also, is there a way to make Matlab automatically label these maxima on the plot with their respective x and y coordinates? Or, alternatively, can anyone suggest a Matlab script/command(s) that would make Matlab take the derivative of one array with respect to another, set this derivative equal to zero, and output the array values at which this derivative equals zero, for those array values w...

Matlab Help with finding x and y values
I'm still pretty new to matlab so I need help with my situation. Is there a command where I can find the x-value of a point given a y-value? Example: Given the point (4,3) on a graph, how do I find the x-value 4 if I already the y-value 3. The point I need isn't part of an equation. It is just points that have been entered and plotted from a set of data. Thanks Are you interested in finding the x-values from the points on the plotted graph? Otherwise, you have to use the inverse formula fo the equation. Yumnam Kirani Singh Tronglaobi Awang Leikai "Bunta Yang" wrote in message <ifrjjt\$79h\$1@fred.mathworks.com>... > I'm still pretty new to matlab so I need help with my situation. Is there a command where I can find the x-value of a point given a y-value? > > Example: Given the point (4,3) on a graph, how do I find the x-value 4 if I already the y-value 3. > > The point I need isn't part of an equation. It is just points that have been entered and plotted from a set of data. > > Thanks ...

Getting X-coordinates from arbitrary Y-values
Hi, Could you please tell me how to get the X-coordinate corresponding to an arbitrary Y-coordinate. For example if x = 1:20 y = rand(1,20) I would like to find the value(s) of x corresponding to any arbitrary value of y ... say at y(0.2) ? Is there any function in MATLAB which does this? Thanks a lot, Soumyadip. Thanks a ton. I tried x(y > value-offset & y < value+offset ) and got decent results ... but there are repetations in the results. Do you know how i can select unique numbers from an array say for example if i have a = [2 3 3 4 4 4] .. I want to take only a =...

Getting x and y values from a matrix plot
If I have a x, y graph which I plotted from a matrix, is there anyway I can find the highest two values for the Y axis and their corresponding X-axis values? Regards doc max In article <fkgqgd\$g8o\$1@fred.mathworks.com>, Desmond <pin_loon@yahoo.com.sg> wrote: >If I have a x, y graph which I plotted from a matrix, is >there anyway I can find the highest two values for the Y >axis and their corresponding X-axis values? get the XData and YData properties from the graph handle. Sort the YData using the two-output version of sort. Take the last two values of the second ...

How can I graph muliple sets of y-values against a single set of x-values?
Hi.&nbsp; I am trying to write a VI that will take columns of data&nbsp;stored in a 2D array and plot it with the first column being the x-coordinates and all subsequent columns (different parameters) of data being y-coordinates.&nbsp; The number of these parameters is determined by the user, but it could be as high as 128.&nbsp; I think that I need to write a for loop that will pair each column of y-coordinates with&nbsp; the column of x-coordinates in a cluster, and then create an array of clusters to be plotted with an xy graph, but I am not sure how to do this.&nbsp...

Given x value, how do I find the y value of a point on a bezier curve? #2
This is an example of USENET ...

want plot y axis value according to change of x axis value
I want plot y axis value according to change of x axis value. in the below site, value change according to change of x value. how can i plot line at y axis. http://www.technology2skill.com/electronics/small_signal_analysis.html "se chss" wrote in message <io5opt\$kdu\$1@fred.mathworks.com>... > I want plot y axis value according to change of x axis value. > in the below site, value change according to change of x value. > how can i plot line at y axis. > http://www.technology2skill.com/electronics/small_signal_analysis.html There are so many graphs on your lin...

Getting values in between the values of a vector?
Say I have a vector that's like this: [-6 -3 0 3 6] How can I get it get the number in between each of the two values to return something like: [-4.5 -1.5 1.5 4.5] Is there a built-in function that can do this? I'm asking because I'd like to avoid a loop if possible (but I'm thinking it's the only way). Thanks! "Brandon Rodriguez" <coasters2k@yahoo.com> wrote in message <gsfp69\$19b\$1@fred.mathworks.com>... > Say I have a vector that's like this: > > [-6 -3 0 3 6] > > How can I get it get the number in between each of the two v... Web resources about - Get x values for specific y value of the histogram - comp.soft-sys.matlab Image histogram - Wikipedia, the free encyclopedia
... light and pure white areas. The vertical axis represents the size of the area that is captured in each one of these zones. Thus, the histogram ...

A Robust Histogram for Massive Parallelism
Preserving highly parallel performance when every thread is simultaneously trying to increment a single object What the Histogram on Your Camera Actually Tells You
You've almost certainly seen a histogram on your camera's display at some point, but if you don't take photography particularly seriously you ... An Explanation of What a Camera Histogram Graph is and How It Can Help You Take Better Photos
... course for CreativeLive , photographer John Greengo gives a simple explanation of that color graph on your camera’s display known as a histogram ... How to Use the Image Histogram in iPhoto
... and plotting data. Perhaps you never quite understood why you needed to learn this. Until now! Sandro Cuccia shows you how a photo's Histogram ...

Post-Debate Bounce Histogram
Post-Debate Bounce Histogram Restaurant histograms of the day
I have a column at Grub Street today looking at some check-by-check level data for five New York restaurants.

Dragons on the far side of the histogram
... other 499 guests have that problem… just deal with it”. You wouldn’t come back next Summer. So do have a look at the far side of your histogram. ...

Resources last updated: 3/10/2016 4:10:31 PM