Nyhetsgrupper: comp.soft-sys.matlab
Fra: Rune Allnor <all...@tele.ntnu.no>
Dato: Mon, 21 Jul 2008 16:09:43 -0700 (PDT)
Lokal: Tirs 22 Jul 2008 01:09
Emne: Re: combine data?
On 16 Jul, 12:37, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 16 Jul, 10:00, "jay vaughan" <jvaughan5.nos...@gmail.com> wrote: It took a little bit of time to get this test done, but > > Hi, > > I am trying to find a way tocombinedatawithout using a > Sigh... the vixen of vectorisation in all her splendour... at last some hard facts. I implemented the three algorithms suggested in this thread: Below is the report from the profiler (R2006a) as well as The C++ code is likely to become relatively slower Conclusions? Don't mistake the number of typed Rune %%%%% Profiler report %%%%%%%%%%%%%%%%%%%%%%%%%%%%% test 1 0.698 s 0.070 s %%%%%% test.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N = 10; [wid1,wei1]=dataweights(width,weight); %%%%%% alt1.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wiv = unique(width); for n=1:length(wev) %%%%%% alt2.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [wid, a, b] = unique(width); /// dataweights.cpp ////////////////////////////////////////////// using namespace std; extern void _main(); void mexFunction( if (nrhs != 2) if (nlhs != 2) if ((mxGetClassID(prhs[0]) != mxINT32_CLASS)|| if ((mxGetClassID(prhs[1]) != mxDOUBLE_CLASS)|| int MWeights = mxGetM(prhs[0]); if (!((NWeights == 1) &&(NWidths == 1))) if (MWeights != MWidths) std::map<int,double> data; for (int n=0;n<MWeights;n++) int dims[2]; weight = (int*)mxGetData(plhs[0]); return; } /////////////////////////////////////////////////////////////////// Du må logge deg på før du kan legge inn meldinger.
For å kunne legge inn meldinger må du først bli med i denne gruppen.
Oppdater kallenavnet på siden for abonnementsinnstillinger før du legger inn meldinger.
Du har ikke tillatelse til å legge inn meldinger.
| ||||||||||||||