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 for Programming
 LabTalk Forum
 modulus functions and series of n functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kase978

3 Posts

Posted - 12/08/2010 :  08:08:19 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0
Operating System: Windows XP

Does anyone know how to plot this two functions:
- modulus functions, e.g. |sin(x)|
- Series of n functions, e.g. Sum(x^n) with n= 1,2,3,….,n-1,n

Thank you very much in advance
Gaspare

VincentLiu

China
Posts

Posted - 12/09/2010 :  03:59:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You could easily get what you want by using the Set Values dialog. Suppose you have put the X values in column A, and want to get the values of column B by using functions you given.

1. Use the |sin(x)| function
Please highlight column B, right click on it to select Set Column Values from the context menu. Then input abs(sin(col(a))) into the box as the following screenshot shows and click OK button to get the values.



2. Use the Sum(x^n) function ,and suppose n = 3.
Please highlight column B, right click on it to select Set Column Values from the context menu. Then input ds into the upper edit box and input the following scripts into the Before Formula Scripts panel

int n = 3;
range ra = !col(a);
dataset ds;
ds.setsize(ra.getsize());
ds=0;
for(int ii=1;ii<=n;ii++)
{
ds += ra^ii;
}

as the following screenshot shows and click OK button to get the values.



Vincent
OriginLab Technical Services

Edited by - VincentLiu on 12/09/2010 04:41:47 AM
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