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
 Moving Average on existing Graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cqy2016

Germany
10 Posts

Posted - 08/25/2016 :  05:04:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2015
Operating System: windows 7

Hi,

Currently we have our graphs successfully created, and is there an easy way to simply add moving average graph onto the existing graph with, let's say 100 points?

Thanks and best regards!

CQY

Chris D

428 Posts

Posted - 08/25/2016 :  09:57:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Perhaps your best bet is to perform a moving average on the original data within the worksheet itself. Then plot that data along with the original data.

Add a new column to the worksheet and in the F(x)= row, use this function:
movavg(vd,back,forward)

Where vd is the source column (e.g. col(B)) and back and forward are the windows.

For example:
movavg(col(B),100,100)

I hope this helps.


Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

cqy2016

Germany
10 Posts

Posted - 08/26/2016 :  04:22:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Chris D

Hi,

Perhaps your best bet is to perform a moving average on the original data within the worksheet itself. Then plot that data along with the original data.

Add a new column to the worksheet and in the F(x)= row, use this function:
movavg(vd,back,forward)

Where vd is the source column (e.g. col(B)) and back and forward are the windows.

For example:
movavg(col(B),100,100)

I hope this helps.


Thanks,
Chris Drozdowski
Originlab Technical Support





Hi Chris,

Yep, this way works also.

Nice weekend!

Best regards!

CQY
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 08/29/2016 :  2:32:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi CQY,

You can also run the adjacent averaging smoothing ("Analysis> Signal Processing> Smoothing" menu)
directly on the plot as it is essentially the same to the moving averaging (by movavg function),
though there have a few minor differences as follows:

- movavg function can control averaging with both back and forward offsets. In the case of adjacent
averaging, back=forward, and "Points of Window"=(back+forward+1).

- Adjacent averaging has the "weighted average" option, and movavg doesn't have this option.
http://www.originlab.com/doc/Origin-Help/Smooth-Algorithm#The_adjacent-averaging_method

- Adjacent averaging has the "boundary condition" option (though None may be a typical choice), and
movavg doesn't have this option.
http://www.originlab.com/doc/Origin-Help/Smooth-Dialog

Hope this helps additionally.

--Hideo Fujii
OriginLab

P.S. As this is a post in LabTalk forum, if you want to use the adjacent averaging, you can use
"smooth" x-function in your LabTalk code..
http://www.originlab.com/doc/X-Function/ref/smooth

Edited by - Hideo Fujii on 08/29/2016 2:39:22 PM
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