T O P I C R E V I E W |
protobion |
Posted - 01/22/2005 : 03:00:32 AM I am plotting Linear fits of data. I cannot find an option that allows me to get the slope of the linear plot. Anyhelp here please? Er, no Labview available.
Edited by - protobion on 01/22/2005 03:09:01 AM |
4 L A T E S T R E P L I E S (Newest First) |
protobion |
Posted - 01/23/2005 : 08:18:39 AM Thanks again. I see how this button-script relation works now. |
Mike Buess |
Posted - 01/23/2005 : 06:00:44 AM Open Custom.ogs in notepad and replace the script under the [Main] section with your script. That section is run by the Custom Routine button on Origin's standard toolbar.
Mike Buess Origin WebRing Member |
protobion |
Posted - 01/23/2005 : 02:23:03 AM Thanks a lot Mike. I can now do exactly what I wanted to. Is there any way to turn this into a convenient button? |
Mike Buess |
Posted - 01/22/2005 : 07:40:44 AM The Analysis->Fit Linear and Tools->Linear Fit menu commands print slope and intercept to the results log. Use the stat object to obtain those values programmatically.
>>Er, no Labview available.
That's OK. LabView is not required.
...You can add a text label to your graph showing the slope and intercept as follows.
1. With graph active run Analysis->Fit Linear. 2. Enter this LabTalk command in the script window...
label -s -sa "slope=$(stat.lr.b)\nintercept=$(stat.lr.a)";
That will create a text label that looks like this...
slope=<value of slope> intercept=<value of intercept>
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 01/22/2005 12:07:28 PM |