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 for Programming
 LabTalk Forum
 modulus functions and series of n 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
kase978 Posted - 12/08/2010 : 08:08:19 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
VincentLiu Posted - 12/09/2010 : 03:59:01 AM
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

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