Showing results for 
Search instead for 
Did you mean: 

data prediction for long period of time


  I am using basic package labview 2012. I have sets of data for a long period of time, let's a day or a week or how ever long. but I would like to predict the next day or next week or how ever long set of data. Is there a Vi that can help me do that?

My data files have 288 samples.  7 x 288. I havent started on the code yet, I'd like to get some ideas before I start

0 Kudos
Message 1 of 7

This forum is best utilized after you've started working on it a bit. If you stumble through a few things and then come back for help when it doesn't work just right, that's when we can really help best.


Your specific problem sounds like a basic math problem... so you can use the Numeric palette to do the multiplication.



"Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  - Abraham Lincoln


Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'

0 Kudos
Message 2 of 7

Do a Web search on Extrapolation.  You really need to think about what you want to do, and to have some idea about the math involved.


To help you clarify your thinking, suppose you have data collected over a period of time (the interval does not matter -- it could be long or short).  For the sake of argument, suppose you had 288 values collected more-or-less hourly for 12 days.  


Judging only from the data, tell me what the value would have been if you made a measurement on the half-hour after 5 days.  Draw out the problem (a lot of programs start with "diagrams on a napkin") and think about how you would come up with a value that was "in the middle" of the data points you already had taken.


Now think about how you would estimate (aha!  that word, itself, should give you a clue which textbooks you need to study) the value you would get an hour after you took the final (288th) reading.  How about a reading the next day?  Generalize.


Once you understand the operations you would need to perform, you can think about how to use LabVIEW to do them.  Don't expect that there is a LabVIEW VI specifically designed to solve each of your tasks -- sometimes we need to write them ourselves.


Bob Schor

0 Kudos
Message 3 of 7

Thanks for the reply,

So I have my 2D array of data as my Y values and an array of timestamps as my X values. I created a tabulated array Z. Then I tried to extrapolate it and I get          nothing out. Im not sure what went wrong


. extrapolation.png



0 Kudos
Message 4 of 7

Hello ritch_by_nature,

What do you see when you use the Highlight Execution debugging tool? What values is the Interpolate 2D function outputting?

Here's a short resource on using the Highlight Execution tool: Diagram Toolbar

Alex C.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 7

I get 0 as output even when I match the the array sizes. I get error 20145

0 Kudos
Message 6 of 7

Hello ritch,

Are you still getting error 20145? 

Sorry about going AWOL for so long! I was out of the office for quite a while.

Have you taken a look at this community example for extrapolating linear best fit?

Alex C.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7