Author |
Topic |
|
GiuliaF
2 Posts |
Posted - 03/29/2012 : 04:42:49 AM
|
Origin Ver. 8.1 and if then loop; Operating System: Windows
Hallo i am newy in origin, i am trying to elaborate some data: i want to corrected some radiance temperature with emissivity values, i have got 2 formula one if solid T>1630K one if liquid; and i am using if then loop is this ok?? it gives me a compiling erro on declaration variables!!
// Declare ranges for columns A and B range ra = col(C); range rb = col(B); // Fix the test value "Melting Radiance Temperature" vtest = 1630; // if then loop loop(row,1,ra.GetSize()) { if(ra[row] > vtest) rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]); else rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]); }
Best Regards Fidelma |
|
Hideo Fujii
USA
1582 Posts |
Posted - 03/29/2012 : 09:22:08 AM
|
Hi Fidelma,
It seems the following two lines don't have the matching parenthesis ')':
1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]);
and
1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]);
--Hideo Fujii OriginLab |
|
|
GiuliaF
2 Posts |
Posted - 03/30/2012 : 02:56:21 AM
|
Thank you very much i have correct it this way :
range ra = col(C); range rb = col(B); // Fix the test value "Melting Radiance Temperature" vtest = 1630; // if then loop loop(row,1,ra.GetSize()) { if(ra[row] > vtest) rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row])); else rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row])); }
But it is giving me the same this error:
Error, syntax error in variable declaration.
Compiling errors found, linking cannot start!
The error is signed on the line of( range ra=....)
quote: Originally posted by Hideo Fujii
Hi Fidelma,
It seems the following two lines don't have the matching parenthesis ')':
1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]);
and
1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]);
--Hideo Fujii OriginLab
|
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 03/30/2012 : 09:45:31 AM
|
Hi Fidelma,
Your code is of LabTalk script, so you don't need to compile, and you can run as is given by the LabTalk interpreter. You can copy-and-paste to the Script window("Window: Script Window" menu), highlight all lines, and press ENTER key to run; Or you can put your script in a script file(.OGS), and run by various way. Please consult to the following page (or its counterpart in the LabTalk help) for the details:
http://wiki.originlab.com/~originla/ltwiki/index.php?title=Category:LT_Running_Scripts
Hope this makes sense.
--Hideo Fujii OriginLab |
|
|
|
Topic |
|
|
|