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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 255 chars limit for function?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

SteffenG

Germany
Posts

Posted - 08/23/2004 :  08:57:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I am using Origin 7G (german version) with SR4. I have the following problem. I have declared a function with the script line F2(x)=... The function is drawn properly in the actual graph window. If I save the project and close and open it again the function is truncated.
The function itself has 285 chars. If I save the project the function is truncated to 30 chars so there is a difference of 255 chars. For me it is like an overflow of a string length or something similar to that. So is there a limit for the size of a function? Is there a work around for that problem?

I am grateful for any hints.
Regards,
Steffen

Mike

USA
357 Posts

Posted - 08/24/2004 :  09:51:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Steffen,

This is a known problem (QA #6337 in our bug/suggestion database):
quote:
"Currently, a function definition can have over 500 characters, and it works properly, but when you save the file and re-open, the function definition has been cutoff and fails. Cutoff is mod(256), so current limit is probably 255."


The notes indicate that it is being worked on for Origin 8.

Mike
OriginLab
Go to Top of Page

easwar

USA
1965 Posts

Posted - 08/25/2004 :  1:33:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Steffen,

If you have version 7 or 7.5, one possible workaround is to define/code your function as an Origin C function, and then just call the OC function from the Function Plot.

For example, you can define a function in OC such as:


double myfunc(double x)
{
return sin(x)/x;
}



and then call that from the Function Plot as:
F1(x)=myfunc(x)

With Origin C, you will have no limitations on number of characters etc.

Easwar
OriginLab

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000