Prev: www.voguesneakers.com Cheap Jordans,Cheap Nikes,Cheap Air Max 90
Next: IDEA search - fast read and write on workspace at RUNTIME (Simulink)
From: Charles on 27 May 2010 10:54 Hi, although I am still trying to get it right. But this is how it should work. 'A' is my data. If I sample all data data points at equal interval, say total_points=30; interval_points=linspace(min(A(:,1),max(A(:,1),total_points) then I can evaluate the points at specific intervals. new_A=interp1(A(:,1),A(:,2),interval_points); so that if I plot new_A, I should have the same data. I am still fine tuning my code. I want a reduction in the data cos I need to use it as input to a supervised learning algorithm in case you wonder why I want to go through the pain of achieving this. Thank you for your contribution. Charles "us " <us(a)neurol.unizh.ch> wrote in message <htm087$skp$1(a)fred.mathworks.com>... > "Charles " <nkwosman(a)yahoo.com> wrote in message <htlvds$l2$1(a)fred.mathworks.com>... > > I think your suggestion is good. And actually, I am using exactly the same thing already and still used the 2 columns. Thanks a lot. > > ??? > firstly, how is this going to help with respect to your original problem (as stated in the OP)... > then, how do you get from your exemplary A1 -> A2 using this approach... > > us
From: Steven Lord on 27 May 2010 12:58 "Charles " <nkwosman(a)yahoo.com> wrote in message news:htlram$fb8$1(a)fred.mathworks.com... > Hi, > > thanks for your information. Unfortunately, I cannot take one column and > ignore the other. > Here is a sample of my data > > 0.066842 0.17721 > 0.57632 0.30842 > 1.0858 0.44874 > 1.5953 0.58121 > 2.1047 0.69558 > 2.6142 0.78242 > 3.1237 0.84037 > 3.6332 0.88074 > 4.1426 0.91695 > 4.6521 0.95016 > 5.1616 0.97679 > 5.6711 0.991 > 6.1805 0.997 > 6.69 1 > > Any kind of transformation that will reduce the data to one column will be > fine. Thanks. You contradict yourself. You say here that any kind of transformation will be fine as long as it reduces the data to one column. Well, here's one: f = @(A) A(:, 1) But you said in your second sentence that this transformation is not acceptable. Well, why not? You need to give more details about what, SPECIFICALLY, you're trying to do before we can figure out how to help you. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Charles on 27 May 2010 15:39 Hi Steve, the problem earlier was that the I have many of such data (150), so I thought that I took only one column, I will lose information in the process. Here is how I tackled the problem. I got the global minimum and maximum of the data. Used x= linspace(min,max,total_points) to generate the x axis. and then used the 'interp1' function to evaluate each of the data pairs, and take the 'y-axis' as my single column that I sought. To visualise my data, I just plot (x,y) and it works ok. As I am interested in knowing new things, how does f = @(A) A(:, 1) really work? Couldn't figure it out. Anyway, thanks a lot for your assistance. Charles "Steven Lord" <slord(a)mathworks.com> wrote in message <htm8ai$g2a$1(a)fred.mathworks.com>... > > "Charles " <nkwosman(a)yahoo.com> wrote in message > news:htlram$fb8$1(a)fred.mathworks.com... > > Hi, > > > > thanks for your information. Unfortunately, I cannot take one column and > > ignore the other. > > Here is a sample of my data > > > > 0.066842 0.17721 > > 0.57632 0.30842 > > 1.0858 0.44874 > > 1.5953 0.58121 > > 2.1047 0.69558 > > 2.6142 0.78242 > > 3.1237 0.84037 > > 3.6332 0.88074 > > 4.1426 0.91695 > > 4.6521 0.95016 > > 5.1616 0.97679 > > 5.6711 0.991 > > 6.1805 0.997 > > 6.69 1 > > > > Any kind of transformation that will reduce the data to one column will be > > fine. Thanks. > > You contradict yourself. You say here that any kind of transformation will > be fine as long as it reduces the data to one column. Well, here's one: > > f = @(A) A(:, 1) > > But you said in your second sentence that this transformation is not > acceptable. Well, why not? > > You need to give more details about what, SPECIFICALLY, you're trying to do > before we can figure out how to help you. > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > To contact Technical Support use the Contact Us link on > http://www.mathworks.com >
From: TideMan on 27 May 2010 16:56 On May 28, 7:39 am, "Charles " <nkwos...(a)yahoo.com> wrote: > Hi Steve, > > the problem earlier was that the I have many of such data (150), so I thought that I took only one column, I will lose information in the process.. > > Here is how I tackled the problem. > I got the global minimum and maximum of the data. Used > x= linspace(min,max,total_points) to generate the x axis. > and then used the 'interp1' function to evaluate each of the data pairs, and take the 'y-axis' as my single column that I sought. > > To visualise my data, I just plot (x,y) and it works ok. As I am interested in knowing new things, how does > f = @(A) A(:, 1) > really work? Couldn't figure it out. Anyway, thanks a lot for your assistance. > > Charles > > "Steven Lord" <sl...(a)mathworks.com> wrote in message <htm8ai$g2...(a)fred.mathworks.com>... > > > "Charles " <nkwos...(a)yahoo.com> wrote in message > >news:htlram$fb8$1(a)fred.mathworks.com... > > > Hi, > > > > thanks for your information. Unfortunately, I cannot take one column and > > > ignore the other. > > > Here is a sample of my data > > > > 0.066842 0.17721 > > > 0.57632 0.30842 > > > 1.0858 0.44874 > > > 1.5953 0.58121 > > > 2.1047 0.69558 > > > 2.6142 0.78242 > > > 3.1237 0.84037 > > > 3.6332 0.88074 > > > 4.1426 0.91695 > > > 4.6521 0.95016 > > > 5.1616 0.97679 > > > 5.6711 0.991 > > > 6.1805 0.997 > > > 6.69 1 > > > > Any kind of transformation that will reduce the data to one column will be > > > fine. Thanks. > > > You contradict yourself. You say here that any kind of transformation will > > be fine as long as it reduces the data to one column. Well, here's one: > > > f = @(A) A(:, 1) > > > But you said in your second sentence that this transformation is not > > acceptable. Well, why not? > > > You need to give more details about what, SPECIFICALLY, you're trying to do > > before we can figure out how to help you. > > > -- > > Steve Lord > > sl...(a)mathworks.com > > comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ > > To contact Technical Support use the Contact Us link on > >http://www.mathworks.com Charles: You should get a job as a politician. You have an innate ability to obfuscate. You could have saved a lot of time by just asking: I have a set of points x,y. The x are monotically increasing, but not equally spaced. How can I generate a set of y at equispaced intervals of x? Then us and Steven would have responded: help interp1 and that would have been that.
From: us on 27 May 2010 17:03
TideMan .... > Then us and Steven would have responded: > help interp1 > and that would have been that. YESSSS... :-) us |