File Exchange
Try Origin for Free
The Origin Forum
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
|
Send File to Tech support
Username:
Password:
Save Password
Forgot your Password?
|
Admin Options
All Forums
Origin Forum for Programming
Forum for Origin C
Simple problem
New Topic
Reply to Topic
Printer Friendly
Author
Topic
verrallr@a
Canada
44 Posts
Posted - 06/05/2008 : 2:32:10 PM
Origin Version v7.5885 (B885)
Operating System:
I am trying to program Density into OriginC.
My OriginC program is :
#include <Origin.h>
double Density(double T)
{return (4956.4/(1.0+3.0*10E-6*(-0.78155+0.1177*T-3.0254E-6*T*T)*
(T-298.)));}
In my script window, I get this for 400 degrees:
bc=Density(400);
bc=;
BC=0.3535184
However this is wrong.
When I give the formula in the Script window for 400 degrees, I get this:
dd=(4956.4/(1.0+3.0*10E-6*(-0.78155+0.1177*400-3.0254E-6*400*400)*(400-298.)));
dd=;
DD=4346.987
That is right.
Why won't my Density give me the correct result in the OriginC program.
Thank you for your assistance.
rlewis
Canada
253 Posts
Posted - 06/06/2008 : 02:02:36 AM
I compiled and ran the Density function under OriginPro 7.5-SR6 and it gave the correct answer ...
verrallr@a
Canada
44 Posts
Posted - 06/06/2008 : 1:32:25 PM
I exited Origin 7.5 (non-Pro) and then logged back in to see if that would help. It didn't.
However, I've figured out a new way to get the density.
Richard.
Topic
New Topic
Reply to Topic
Printer Friendly
Jump To:
Select Forum
Origin Forum
Origin Forum
Origin Viewer Forum
Origin Learning Edition Forum
Origin Forum for Programming
Forum for Python
Forum for Origin C
Forum for Automation Server/COM and LabVIEW
LabTalk Forum
Origin中文论坛
Origin 中文论坛 (Chinese Origin Forum)
Japanese Origin Forum
Origin日本語フォーラム (Japanese Origin Forum)
Origin on Linux
The Origin on Linux Forum
Private Forums
Distributor Forum
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000