Prev: fingerprint core / singular point
Next: TD-SCDMA
From: parul agrawal on 29 Mar 2010 03:29 i have plotted a graph in matlab using table, but if i want to find Y value using corresponding X value , how can i get. means suppose i have graph between X and y...........now if i give a particular value of X then how i can get Y value corresponding to that given X value.
From: Sean on 29 Mar 2010 03:55 "parul agrawal" <parulagrawal18(a)gmail.com> wrote in message <hopks2$laa$1(a)fred.mathworks.com>... > i have plotted a graph in matlab using table, but if i want to find Y value using corresponding X value , how can i get. > > means suppose i have graph between X and y...........now if i give a particular value of X then how i can get Y value corresponding to that given X value. x = [0:1:10]; y = rand(size(x))*100; xval = 7; yval = y(x==7);
From: kinor on 29 Mar 2010 04:00 "parul agrawal" <parulagrawal18(a)gmail.com> wrote in message <hopks2$laa$1(a)fred.mathworks.com>... > i have plotted a graph in matlab using table, but if i want to find Y value using corresponding X value , how can i get. > > means suppose i have graph between X and y...........now if i give a particular value of X then how i can get Y value corresponding to that given X value. Hi Parul assuming you have the x and y-values in vectors X, Y and you are looking for the y-value y1 at x-position x1 this would be one of many solutions: idx = find(X==x1); y1 = Y(idx); hth kinor
From: parul agrawal on 29 Mar 2010 05:04 "kinor " <kinor.removethiswithdot(a)gmx.de> wrote in message <hopmmf$if3$1(a)fred.mathworks.com>... > "parul agrawal" <parulagrawal18(a)gmail.com> wrote in message <hopks2$laa$1(a)fred.mathworks.com>... > > i have plotted a graph in matlab using table, but if i want to find Y value using corresponding X value , how can i get. > > > > means suppose i have graph between X and y...........now if i give a particular value of X then how i can get Y value corresponding to that given X value. > > Hi Parul > > assuming you have the x and y-values in vectors X, Y and you are looking for the y-value y1 at x-position x1 > this would be one of many solutions: > > idx = find(X==x1); > y1 = Y(idx); > > hth > kinor Hi thanks its working , but suppose i have x = [1 2 3 4]; y = [2 8 3 9]; plot(x,y); now if i use idx = find(x==3); y1 = y(3); it will give ans = 3 but if i want to use all values of curve (y verses x) then... idx = find(x==2.5); then? means i have plotted curve using some values of x and y but now want to use any value of y on curve corresponding to x...what to do?
From: muhammadzeshan Ali on 21 Apr 2010 01:42
"parul agrawal" <parulagrawal18(a)gmail.com> wrote in message <hopqe8$kun$1(a)fred.mathworks.com>... > "kinor " <kinor.removethiswithdot(a)gmx.de> wrote in message <hopmmf$if3$1(a)fred.mathworks.com>... > > "parul agrawal" <parulagrawal18(a)gmail.com> wrote in message <hopks2$laa$1(a)fred.mathworks.com>... > > > i have plotted a graph in matlab using table, but if i want to find Y value using corresponding X value , how can i get. > > > > > > means suppose i have graph between X and y...........now if i give a particular value of X then how i can get Y value corresponding to that given X value. > > > > Hi Parul > > > > assuming you have the x and y-values in vectors X, Y and you are looking for the y-value y1 at x-position x1 > > this would be one of many solutions: > > > > idx = find(X==x1); > > y1 = Y(idx); > > > > hth > > kinor > > > > Hi > > thanks > its working , but suppose i have > x = [1 2 3 4]; > y = [2 8 3 9]; > plot(x,y); > now if i use > idx = find(x==3); > y1 = y(3); > it will give ans = 3 > > but if i want to use all values of curve (y verses x) then... > idx = find(x==2.5); > then? > > means i have plotted curve using some values of x and y but now want to use any value of y on curve corresponding to x...what to do? can this be done by docinterp1? |