From: Zahra on 3 Aug 2010 19:48 Hi all, I am calculating the errors for a fit to a data set using: [Q,R] = qr(jacobian,0); Rinv = inv(R); se = sqrt(sum(Rinv.*Rinv,2)*resnorm/dfe); I later need to import these error bars into a spreadsheet. However, the se elements are of the follwoing form: (1,1) 1.3053 (2,1) 1.2639 and so on which makes it difficult to import into a spreadsheet. How could I get rid of the (1,1) and (2,1) so I have only an array of the errors bars? Any help is greatly appreciated! Merci.
From: Walter Roberson on 3 Aug 2010 20:27 Zahra wrote: > se = sqrt(sum(Rinv.*Rinv,2)*resnorm/dfe); > I later need to import these error bars into a spreadsheet. However, the > se elements are of the follwoing form: > (1,1) 1.3053 > (2,1) 1.2639 > and so on which makes it difficult to import into a spreadsheet. How > could I get rid of the (1,1) and (2,1) so I have only an array of the > errors bars? How are you examining the se elements? Are you copying from the Variable Editor window perhaps? Or is your jacobian matrix possibly sparse, resulting in a sparse calculation throughout ?? > Rinv = inv(R); There is very likely a better solution than using inv().
From: Zahra on 3 Aug 2010 20:43 No matter how I examine the se elements, I always get the associated indices. Either by looking at them in the the Variable Editor window, or if for example I use: A=se(1,1), it will just write the associated indices (1,1) for A as well... Thank you, Walter Roberson <roberson(a)hushmail.com> wrote in message <i3aceb$30m$1(a)canopus.cc.umanitoba.ca>... > Zahra wrote: > > > se = sqrt(sum(Rinv.*Rinv,2)*resnorm/dfe); > > > I later need to import these error bars into a spreadsheet. However, the > > se elements are of the follwoing form: > > (1,1) 1.3053 > > (2,1) 1.2639 > > and so on which makes it difficult to import into a spreadsheet. How > > could I get rid of the (1,1) and (2,1) so I have only an array of the > > errors bars? > > How are you examining the se elements? Are you copying from the Variable > Editor window perhaps? Or is your jacobian matrix possibly sparse, resulting > in a sparse calculation throughout ?? > > > Rinv = inv(R); > > There is very likely a better solution than using inv().
From: Jan Simon on 3 Aug 2010 20:46 Dear Zahra, > I later need to import these error bars into a spreadsheet. However, the se elements are of the follwoing form: > > (1,1) 1.3053 > (2,1) 1.2639 The variable "se" is sparse. You can convert it to a full array: full(se) Kind regards, Jan
From: Zahra on 3 Aug 2010 20:54
Thank you so much Jan, full(se) works perfectly, I now have all of the errorbars in full arrya format. Thanks again! "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <i3ad8e$17$1(a)fred.mathworks.com>... > Dear Zahra, > > > I later need to import these error bars into a spreadsheet. However, the se elements are of the follwoing form: > > > > (1,1) 1.3053 > > (2,1) 1.2639 > > The variable "se" is sparse. You can convert it to a full array: > full(se) > > Kind regards, Jan |