DSPRelated.com
Forums

Libre Office Calc Code for AMDF

Started by rickman February 13, 2016
I wrote a spread sheet some time back to help me visualize the results 
of an AMDF calculation on some waveforms.  It did just what I wanted 
then.  I opened the spread sheet the other day to add a column of AMDF 
calculations and I don't seem to remember just what I had done.

I copied the formula from another column that is calculating an AMDF and 
changed the column reference to point to a new signal.  But the new calc 
results are all zero.  I see that the formula in the old calculations 
show curly braces around it {} when I put the cursor on a cell, but when 
I click to edit it the curly braces are not actually part of the 
formula.  Is this some sort of array computation that I don't remember? 
  What do the curly braces indicate?

Here are the formulas

=SUM(ABS(M$23:M$3056-M23:M3056))
=SUM(ABS(M$23:M$3056-M24:M3057))
.
.
.

-- 

Rick
On 2/13/2016 9:39 PM, rickman wrote:
> I wrote a spread sheet some time back to help me visualize the results > of an AMDF calculation on some waveforms. It did just what I wanted > then. I opened the spread sheet the other day to add a column of AMDF > calculations and I don't seem to remember just what I had done. > > I copied the formula from another column that is calculating an AMDF and > changed the column reference to point to a new signal. But the new calc > results are all zero. I see that the formula in the old calculations > show curly braces around it {} when I put the cursor on a cell, but when > I click to edit it the curly braces are not actually part of the > formula. Is this some sort of array computation that I don't remember? > What do the curly braces indicate? > > Here are the formulas > > =SUM(ABS(M$23:M$3056-M23:M3056)) > =SUM(ABS(M$23:M$3056-M24:M3057)) > . > . > .
Just to be clear, when I place the cursor on the cells (not in edit mode) that contain the formulas that work they look like this. {=SUM(ABS(F$23:F$3056-F23:F3056))} {=SUM(ABS(F$23:F$3056-F24:F3057))} When I try to edit them they look like... =SUM(ABS(F$23:F$3056-F23:F3056)) =SUM(ABS(F$23:F$3056-F24:F3057)) I found some info on array calculations and that seems to be the missing point. I can use the Function Wizard to set any one formula to an array formula, but if I try to do that to more than one at a time it copies the same formula to each. If I try doing a copy by dragging the corner it also sets the formulas the same. If I make two adjacent cells array formulas and try selecting both and copying by dragging the corner, none of the copied cells are array formulas. I need to do this on 3000 formulas. Obviously I didn't do this one cell at a time when I created this sheet. -- Rick
On 2/13/2016 10:09 PM, rickman wrote:
> On 2/13/2016 9:39 PM, rickman wrote: >> I wrote a spread sheet some time back to help me visualize the results >> of an AMDF calculation on some waveforms. It did just what I wanted >> then. I opened the spread sheet the other day to add a column of AMDF >> calculations and I don't seem to remember just what I had done. >> >> I copied the formula from another column that is calculating an AMDF and >> changed the column reference to point to a new signal. But the new calc >> results are all zero. I see that the formula in the old calculations >> show curly braces around it {} when I put the cursor on a cell, but when >> I click to edit it the curly braces are not actually part of the >> formula. Is this some sort of array computation that I don't remember? >> What do the curly braces indicate? >> >> Here are the formulas >> >> =SUM(ABS(M$23:M$3056-M23:M3056)) >> =SUM(ABS(M$23:M$3056-M24:M3057)) >> . >> . >> . > > Just to be clear, when I place the cursor on the cells (not in edit > mode) that contain the formulas that work they look like this. > > {=SUM(ABS(F$23:F$3056-F23:F3056))} > {=SUM(ABS(F$23:F$3056-F24:F3057))} > > When I try to edit them they look like... > > =SUM(ABS(F$23:F$3056-F23:F3056)) > =SUM(ABS(F$23:F$3056-F24:F3057)) > > I found some info on array calculations and that seems to be the missing > point. I can use the Function Wizard to set any one formula to an array > formula, but if I try to do that to more than one at a time it copies > the same formula to each. If I try doing a copy by dragging the corner > it also sets the formulas the same. If I make two adjacent cells array > formulas and try selecting both and copying by dragging the corner, none > of the copied cells are array formulas. > > I need to do this on 3000 formulas. Obviously I didn't do this one cell > at a time when I created this sheet.
Nevermind. I finally set two cells as array formulas and copied them to all the others as a copy and paste and it worked. Don't know why dragging the corner didn't work. -- Rick
On 02/14/2016 04:20 AM, rickman wrote:
> > Nevermind. I finally set two cells as array formulas and copied them > to all the others as a copy and paste and it worked. Don't know why > dragging the corner didn't work. >
I think you had to do something like crtl-atl-enter to set array formulae... or shift-ctrl-... whatever...(beentoolong)
On 2/14/2016 3:44 AM, Johann Klammer wrote:
> On 02/14/2016 04:20 AM, rickman wrote: >> >> Nevermind. I finally set two cells as array formulas and copied them >> to all the others as a copy and paste and it worked. Don't know why >> dragging the corner didn't work. >> > I think you had to do something like crtl-atl-enter to set array formulae... > or shift-ctrl-... whatever...(beentoolong)
The problem was copying one cell to 3000 cells. The copy didn't work one way, but did work the other. -- Rick