The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Plotting function defined by worksheet

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cvhorie Posted - 09/09/2009 : 04:23:00 AM
Origin Ver. and Service Release 8, sr 6
Operating System: XP SP3

I am transferring from Excel, with a steep learning curve.
I wish to plot the following function (for glass transition temperature), with the parameters, p1-3 specified in a worksheet. I shall want to layer multiple plots by varying the parameters for different materials.
y=(0.00048*x*p1+p2*(1-x)*p3)/(0.00048*x+p2*(1-x))

How do I read a parameter from a worksheet into a function?
It would be nice to be able to copy the function down a line and have the parameters change automatically, as Excel does. Does Origin do this?

Thank you

Velson Horie
6   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 09/13/2009 : 10:13:15 PM
Is Set Values that you mentioned the Set Values Dialog?
You need not delete the exsisting column to change the set. You can select the column, and right-click, in the context menu, Select: Set Column Values and Set Values Dialog is opend. You can change your previous scripts.
You can also click the green icon on the top right corner of the column (If you select "Auto" in Recalculate Combo Box of Set Values Dialog). And Select: Change Parameters to open Set Values Dialog.

Sam
OriginLab Technical Services
cvhorie Posted - 09/11/2009 : 07:01:27 AM
Points on this
1. In order to change Set Values previously set, one has to delete the existing column, then save a new set of Scripts.

2. Unfortunately when opening the new function box then typing in the function string, the set values (which I named by descriptive terms - a hangover from Pascal) dialog box closes. It would be useful to have the Set value box open.

Velson Horie
cvhorie Posted - 09/10/2009 : 11:32:24 AM
Do you know, it looks as though it might have been written just for me?!

Thank you

Velson Horie

Velson Horie
Sam Fang Posted - 09/10/2009 : 06:40:46 AM

    You can refer to this web page:
    http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Plot_Functions_with_Parameters_Defined_in_a_Worksheet
    It introduces how to plot functions with parameters in a worksheet.


Sam
OriginLab Technical Services
cvhorie Posted - 09/09/2009 : 2:17:17 PM
Thank you for this lead which provides a solution to getting a curve.

However, I was hoping to create mathematical curves, rather than a succession of joined up points (which I can do in Excel). Function Graph implies that this is possible.

Is there a way to do this?

Thank you

Velson Horie
Sam Fang Posted - 09/09/2009 : 06:17:34 AM
You can put the parameters in a worksheet.
And create a new worksheet to specify the points from the function. Define a column for X values in the worksheet, and select the second column, from Main Menu, Select: Column: Set Column Values.
Type the following scripts to define the range of the parameter columns in the bottom "Before Formula Scripts" Listbox of the opened "Set Values" Dialog.

    range aa=1!;      //Define the range of parameters' worksheet.
    range p1=%(aa)1;  //Assume p1 is stored in first column
    range p2=%(aa)2;  //Assume p2 is stored in second column
    range p3=%(aa)3;  //Assume p3 is stored in third column


Then on the top Listbox, you can specify your function to create Y values. Definition for your function is as follows.

     (0.00048*Col(A)*p1[1]+p2[1]*(1-Col(A))*p3[1])/(0.00048*Col(A)+p2[1]*(1-Col(A)));


The above script creates Y values for the first row of Parameters' worksheet. Y values can be updated automatically as the first row's values of Parameters' worksheet change.
You can add more columns to create Y values for other rows of Parameters' worksheet, and use these Y values to create multiple plots.



Sam
OriginLab Technical Services

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000