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
 Editing new functions

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
Jose Posted - 12/15/2000 : 07:13:25 AM
I am working with a project that uses several new functions defined by me. How can I edit any of them, without having to plot it and going to Plot Details to change its functional dependence? The "edit" command,

edit myfn;


creates a dataset based in that function and then opens it to allow me to edit the data, but this is not what I want... Is there any similar command (or option) to edit the function itself? I could not easily find it by searching the help files.

j.
4   L A T E S T    R E P L I E S    (Newest First)
Jose Posted - 12/18/2000 : 12:56:02 PM
This last idea is very good It really saves time!

j.
cpyang Posted - 12/18/2000 : 09:21:02 AM
It is a general problem of LabTalk that it does not support functions. The kind of dataset based function is really just for plotting. We are going to add general support for functions in our next version of Origin, but until then (or beta time), there is no easy way except those that you already know.

One thing that can save some time is to keep a plot window as the only window in a folder and keep it minimized. These way you can choose the function from the data list to open the plot details dialog without waiting for drawing the function to draw.


Jose Posted - 12/18/2000 : 06:54:43 AM
This is quite useful, and I sometimes use it. But the problem with this is that you are not allowed to see the fuction definition before re-defining it. If, for instance, my funcion is a large one, with several parameters, automatically created by a script, and now I want to slightly change some of its parameters, I have the following possibilities:

1) to plot it in a graph and edit it (it was not previously ploted, because I am not interested in the function itself, but in certain derived functions or data)

2) to follow your tip and retype it again in the script window... completely.

The second possibility is not useful if the fuction is so complicated that I don't know it by heart. It would be easier (and solve my problem) if I could get the definition of my function in the script window, for example by simply typing

 f(x)=;


the same way you read variables. This is what I am looking for, and was not able to find yet. Do you think it is possible?

j.
rtoomey Posted - 12/15/2000 : 12:02:42 PM
Jose,

There isn't any command for editing functions defined in Origin. However, you can define and edit functions directly in the Script window. To see what I mean, try the following:

1) Click on the New Function Graph window to open an empty New Function Graph.
2) Cancel out of Plot Details so that no functions are created.
3) Open the Script window (Window : Script Window).
4) Type in a function such as f(x)=2*x and press the ENTER key on your keyboard.

You should see the curve automatically placed in the New Function Graph window.

5) Change that function by entering something like the following: f(x)=2*x^2 in the Script window and press ENTER.

You should see that the curve in the New Function dialog box updates to the new equation.

Furthermore, if you define a function through the normal procedure in the New Function dialog box you can still change it in the Script window as I have shown you above.

I hope this helps.

Sincerely,
Ryan Toomey


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