01-23-2013 12:30 PM
Hello,
I am trying to find a method to extend a or extrapolate a set of cuves I have in order to display a curves future values. The curves I am trying to extraplote will be linear.
In addition to this request I was wondering if there is a way to determine the XY intercept(s) between curves. I have DIAdem 12 advanced edition.
01-24-2013 01:29 AM
Hello Tim Z,
One way is to use the linear regression and a new channel with the interoplation/extrapolation points.The example below requires the DIAdem example data-set.
Call ChnLinGen("/LinearGenerated1",0,50,25,"") Call ChnRegrYCalc("","[4]/Temperature_3","[4]/LinearGenerated1","/RegressionY","linear")
Greetings
Walter
01-24-2013 07:17 AM
Hey Walter thanks for the reply unfortunately I do not have the example "data-set" to try your script out on.
If I am reading this right your first command generates a data channel with equalization values. While the other approximates a signal?
I am a little unclear on how to use these commands. I will attach some data to help clarify.
For instance I have two channels which are plotted WRT each other named CopyYTorque & CopYAngle. at the beginning and end of each plot I grabbed a section of data one in Group Best Fit A and the other in Group Best Fit B, I then found the line of best fit between BestFitATorque and BestFitAAngle as well as BestFitBTorque and BestFitBAngle. The result give me the regression of each best fit section.
When I plot these lines they are a little short and I would like to extrapolate these lines as shown in my attached plot. If you look at the last row of data you'll notice some extrapolated data that I physically input which gives me a desired extrapolation which I calculated by finding the y = mx+b equation of each regression line.
I am looking for a way to automate that extrapolation via a function or a script.
FOr some reason I cannot add attachments fell free to email for the data and I will send it over at tim.zoldak@magnapowertrain.com
Thanks
01-24-2013 08:10 AM
Hey Tim Z,
The example data-set is the file which is install with DIAdem. The file name is "Example.TDM" or "Example_Data.TDM". It contains channel group "Temperatures" with three channel. I took the last channel "Temperature_3" of these group. So I assume you have that data-set and channel too.
You are talking about a attached plot. I don't find this plot.
Greetings
Walter
01-24-2013 08:26 AM
Ok Thanks.
I loaded the example file and you script creates a channel named LinearGenerated1 in the 4th group but when it tries to run the second line of code it throws thsi error.
Error in <NoName(1).VBS> (Line: 9, Column: 1):
Cannot interpret channel name in ""[4]/LinearGenerated1"" command.
Also if you read my previous post I was unable to attached any files so I left me email address. If you want to have a lokk send me a an email and I'll forward you the data.
01-24-2013 08:31 AM
Unfortunately I cannot attach the view file
01-24-2013 09:11 AM
I had a look into your data. I assume that you already use the linear regression function of DIAdem. The only thing seems to me that you just need to define a channel for the intersections ("Create evaluation points").
(see picture in attachment)
By the way you are right, the script I posted may not work correct in case of a misspelling problem of the channel name. Please check the channel names you are using the English version the name is "Temperature_3" in the German version it is "Temperatur_3"
Greetings
Walter
01-25-2013 10:16 AM
Hey Walter thanks for the reply.
I am a little uncertain on what function setting the channel performs when calculating regression.
I am plotting [2]/CopyYTorque vs [2]CopyAngle and plotting [4]/BestFitRegressionX vs [4]/BestFitRegressionY
My desired result is to extend the regression line as illustrated.
01-25-2013 01:36 PM
I got it now.
The generated X axis is what the new extraopolted curve will reference.
No to work on how to find an intersection point between two curves.