From: Andres Klever on 22 Oct 2009 14:11 Hi, for those who know this tool 1) i have a problem with the weight In order to perform a weighted fit on this data, the vectors y and dy have to be merged into a 2-by-N matrix and given as the second input argument to ezfit. Compare the results for the usual and weighted fits: fw = ezfit(x, [y;dy], 'exp'); showfit(fw,'fitcolor','red'); f = ezfit(x, y, 'exp'); showfit(f,'fitcolor','blue'); my problem is that when i do this (exactly the same) the data [y;dy] is from a different size than x, so obiously i get this error: ??? Error using ==> ezfit at 272 X and Y dimensions must agree. if you can help me with this it would be great.. 2)the other problem is that when i plot more than one fit for the same data, the plot just shows one legend that is pasted into the other legend, hahaha, so i just can see one of the 2 legends that should appear (showing me the different equations)... , thanks very much,
From: Frederic Moisy on 22 Oct 2009 19:11 Problem #1: This occurs if y and dy are column vectors instead of row vectors. If this is the case, then just replace [y; dy] by [y, dy] Problem #2: Move the equation box using the mouse. Frederic. "Andres Klever" <andisoto(a)gmail.com> wrote in message <hbq787$ml2$1(a)fred.mathworks.com>... > Hi, for those who know this tool > > 1) i have a problem with the weight > In order to perform a weighted fit on this data, the vectors y and dy have to be merged into a 2-by-N matrix and given as the second input argument to ezfit. Compare the results for the usual and weighted fits: > fw = ezfit(x, [y;dy], 'exp'); > showfit(fw,'fitcolor','red'); > f = ezfit(x, y, 'exp'); > showfit(f,'fitcolor','blue'); > my problem is that when i do this (exactly the same) the data [y;dy] is from a different size than x, so obiously i get this error: > > ??? Error using ==> ezfit at 272 > X and Y dimensions must agree. > > if you can help me with this it would be great.. > > 2)the other problem is that when i plot more than one fit for the same data, the plot just shows one legend that is pasted into the other legend, hahaha, so i just can see one of the 2 legends that should appear (showing me the different equations)... > > , > > thanks very much,
|
Pages: 1 Prev: remove element from list Next: Reading TDMS data from UDP socket |