For future questions keep in mind that you will get a better response from the community if you attach a worksheet upper right corner, extended editor. In a graph, how do i find the corresponding xvalue for a. Finding xvalues from found yvalues matlab answers matlab. Finding x values for known y values from a gaussian fit in matlab. It next finds the index of the zero element in dyix, and then adds a very small value to the corresponding y element, so the vector is now monotonically increasing. Sep 11, 2016 i have a plot which is shown in the image above. Question about finding y value for certain x value of a plot matlab. I am looking to find the code which gives me an x value from the line graph given a y. When you execute find with a relational operation like x 1, it is important to remember that the result of the relational operation is a logical matrix of ones and zeros.
I can find the value of y at half maximum, but given the steepness of the slope and the fact that my data is in an array, i am having difficulty finding the 4 x values which correspond to this y value. Also when i ploted, the significant figures in the plotting graph is not long enough that i can not compare the value for instance, using data crusor. Im not sure if you are, but i think you could use the. Therefore, i want to give a commend that orders to give the yvalue at certain xvalue. I know how to get the y values but how do i extract the right x values. If there isnt a data set, it would be nice to get the value of how the plot line. So for some values of y, there are several values of x to be found. Do you want the y values exactly at the position of an x value, or are you interested in x values between two given x values also. I want to know the y value from my graph example x 10 to. How do i use matlab to find an x value given a known y value.
How to find value of z from the meshsurface plot when values. Find value of x, from max y graph matlab answers matlab. So for example, how many hours in that year did the building need 100kw of heat. Now, from the meshsurface plot, how to find the value of z when values of x and y are given. How to find the x at a certain value of yx equation. Open the matlab editor with a blank file filenewscript, and in the blank file, type the following. In the first case consider, that numerical comparisons are bounded by the numerically limited precision. I have a matrix, x 5 6 9 8 4 y 8 7 2 1 9 if i plot this and i need to get position of the x value corresponds to y 1, that means in which row the x value 8 is located. How can i shade my plot to the right of a given x value.
Nov 06, 20 ive defined several variables and made x an array of values. Dec 02, 2015 i have plotted a matlab graph using a long matrix. I want to let the program calculate the x value when y 0. How to find the corresponding x value from a polynomial curve. Id like to spit out an array of the max y coordinate that corresponds to each x coordinate. I would like to do back interpolation to find an x value from the given values of z and y. Hi, i have plotted a scatter graph and now i need to find x value given a y value using the graph. I plot x y graph gaussian function and want to get the x axis value will be two points in this case at a certain y axis value half of the maximum i tried this but it didnt work.
I think my question is quite simple, but i cant figure out a way to do it. I was writing a code for taylors series in matlab so i thought what if i input the function from user itself and the solve for that. How to get maximum value from any plotx,y in matlab quora. Jul 11, 2011 ive been trying to find a simple way to get x values from a given y value for a 3rd order polynomial. So basically if you want to plot anything, of course you need to have the data set. Now, i just need to find the x value that give me f90.
Learn more about curve fit, gauss, curve fitting, value, find, matlab, x given y matlab. The way you described is, as far as im considered, a good way. However, i have no idea how i should do it using the excel functions or formulas. To find a specific integer value, use the operator. I am trying to find the beamwidth of a rectangular patch antenna. My data plot gives me a data cursor which goes by 0. I think that could be a problem for the value i am using. Value of x, which corresponds to maximum value of y. Otherwise, it depends on how you define the best fit line. I then made an anonymous function and used fplot to graph its outputsf in this case for every x value. Learn more about interp1, interpolation, intersection, find x, logarithmic, log10. Lets say if i want to have v the first column in the matrix scanned from top to bottom or vice versa for one specific point in the column to find a z value where if z100, the one point will assign a value for x x1 and y.
How to find value of y if i know x value from grap matlab. Therefore, i want to give a commend that orders to give the y value at certain x value. Then this equation was integrated, resulting in a fifth order equation. As the value of y was previously calculated, i need to know the value for x. How to back interpolation to find x from z and y learn more about interpolation matlab, simulink. Finding x value corresponds to a particular y value. How can i find x for given y value in a fitted curve.
Hi, i have two 1031x1 matrices, one represents the x, the other one the y values for a profile graph. And i need to find a x value when y vale is at minimum value. Also when i ploted, the significant figures in the plotting graph is not long enough that i can not compare the value. How do i find the x value for a given x matlab answers.
Say i want to know the y value at the x value of 5. Find x from y in a graph matlab answers matlab central. How do i use matlab to find an x value given a known y. Find indices and values of nonzero elements matlab find. My homework is to approximate an integer by dividing it into smaller sum, but the equation itself need the maximum value of the absolute of the second differental of the function itself. For example, when i move the curse right side, it goes like 0. Find value of x, from max y graph follow 33 views last 30 days andrew on 17 oct 2014. How to find x value given y value and show the point on a. Question about finding y value for certain x value of a. How to find the value for x for given y on a function. Problems you can find the answers to problems marked with an asterisk at the end of the text. How to find the corresponding x value from a polynomial. How do i get the y value for a given x value learn more about x, y, axis, value, values, given, plot, spect, spectrum. I have some data that ive fit to a gaussian of the form.
How to find value of y if i know x value from grap. I then want to find the corresponding x value that goes along with the newly acquired y values. This matlab function returns a vector containing the linear indices of each nonzero element in array x. Find x value for max y i think what you a looking for is the lookup function in mathcad. Finding yvalue of a function with corresponding xvalue given. This function was defined using the comando polyfit based on some points, resulting in a fourth order equation.
Ive defined several variables and made x an array of values. Solving a equation for the x value with the given y value matlab. I tried to find the maximum value by calculating the smaller piece but the dimension is still too big. I need to find out what the corresponding x value hours is for a given y value heat. The code first takes the difference in the y vector in dy, padding it with a leading 0 so the indices will line up.
Finding the x value for a given y value on a plot matlab. Find x value corresponding to y value in a equation and find. The x and y should have display x 9, y 1, instead it displays x 4, y 5. I have plotted the equations, but i have to find the value of x corresponding to the value at y0. I graphed the fuction on my computer and it is not a root so how do i go about this issue. With reference to the plot that i have, i managed to find the peak values as. Through matlab i use finitedifference method to solve standard dispersal equation with initial condition and boundary condition. View questions and answers from the matlab central community. I need to find for value that changes from positive to negative. Mar 03, 2015 how can i find x for given y value in a fitted. I have the previously pictured plot, and i have found the half intensity values using ginput. I want to know the y value from my graph example x 10 to 11, till 10 to 11 in y axis i have to mark. To directly find the elements in x that satisfy the condition x x x x find x find on a logical matrix.
Nov 07, 20 how do i find x for a given value of y learn more about x, y, input, output. Trial software how to i find a x value from a given y. Hi, i would like to get help with finding the corresponding x values for a given y value. How to use matlab to determine f3f5 for a function and interval of your choice. I now want to know how i can find the corresponding.
Oct 08, 2017 i want to let the program calculate the x value when y0. I need to draw a straight horizontal line at y 100, and make it intersect with the curve, then draw a vertical line from the intersect to the x axis. How to pick out the xvalues for their corresponding y. The result is a 1by0 empty matrix, which i guess is a null. So in that case, id just use the x and y which are already available, and if the x is in the x array that you plotted, you can do this. Find scalar product of two polynomials a and b, given as vector array. You already have x, and y since you plotted it, so theres no need to extract anything from the axes graph at all. May 22, 2019 i plot x y graph gaussian function and want to get the x axis value will be two points in this case at a certain y axis value half of the maximum. It next finds the index of the zero element in dyix, and then adds a very small value.
When i display the data, the x, y, and z values are shown on a figure on coordinate i. It takes a bit of experimenting to get it to do what you want, but its relatively easy. An infinite number of functions could fit these data, and give different values at time0. The function find doesnt help as there is no exact value of y at 0. Jul 15, 20 i have a matrix, x5 6 9 8 4 y8 7 2 1 9 if i plot this and i need to get position of the x value corresponds to y1, that means in which row the x value 8 is located. Mar 26, 2018 so basically if you want to plot anything, of course you need to have the data set. The only way i can think to do it is to solve for x by hand and then type that into matlab but there has to be a simpler way. Find index to x,y pairs matlab answers matlab central. When plotted, there are two peaks where the slope in those regions is very steep. Lets say you have x time and y velocity in order to find the maximum value, you need to employ some matlab functions max and find. I need the corresponding value couples where the y values exceed a certain rmse. Learn more about x value for a given y value, slpoe.