DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

calculation on line data

Solved!
Go to solution

hi everyone 😉

i just start using DIAdem and i dont have idea how i can make some calculation, i  want have chanell with result depent on other chanells but not the same line data, i can use function  Chd(line,No) and i can do make function in one cell of my result chanell (example for first data line: ChD(1,Ch("[4]/Channel1"))=(ChD(1,Ch("[4]/Channel"))+ChD(2,Ch("[4]/Channel")))/2) but i dont know how i can do this function automaticly for other line (example for second line ChD(2,Ch("[4]/Channel1"))=(ChD(2,Ch("[4]/Channel"))+ChD(3,Ch("[4]/Channel")))/2) i have 500 000 line of data so i need know some function who will clalculated this function for all line of my data. i will be grateful for your help. 🙂

0 Kudos
Message 1 of 2
(3,721 Views)
Solution
Accepted by topic author elwis_85

Hello!

 

To get a good calculation performance on your long data you should use a formula in DIAdem. In the past it was the FormulaCalc command. Today the ChnCalculate is recommended. The similar quirk in both commands is that they only can make calculations on one line (but repeat them verry fast for all lines). For you problem this behaviour results in a not obvoius aproach. You have to copy your data to a second channel, delete the number of values your offset gives and then use both channels for the calculation. Here is the script for offset=1:

Call ChnCopy("[1]/Channel","[1]/ChannelCopy")  
Call DataBlDel("[1]/ChannelCopy", 1, 1)
Call ChnCalculate("Ch(""[1]/Result"" )= Ch(""[1]/Channel"" ) + Ch(""[1]/ChannelCopy"" )/2")

Matthias

Message Edited by Twigeater on 02-14-2009 08:12 PM
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 2 of 2
(3,719 Views)