looking for a way to use Excel LINEST( ) in c/c++? | Bytes (2024)

Home Posts Topics Members FAQ

KARTHIK RAJA

looking for a way to use Excel LINEST( ) in c/c++? | Bytes (1) 1 New Member

I am looking for a way to use Excel LINEST, functions in C/C++. Do Microsoft or any third parties offer good tools to enable?? or where can i get the back end coding LINEST function.. to implement in my c program for my controller??

Thank you.

Dec 12 '11 #1

Subscribe Reply

2 looking for a way to use Excel LINEST( ) in c/c++? | Bytes (2) 4657 looking for a way to use Excel LINEST( ) in c/c++? | Bytes (3)

weaknessforcats

9,208 looking for a way to use Excel LINEST( ) in c/c++? | Bytes (5) Recognized Expert Moderator Expert

http://msdn.microsoft.com/ko-kr/libr...ffice.11).aspx

I am not an expert here but this link looks promising.

Dec 12 '11 #2

reply

Rabbit

12,516 looking for a way to use Excel LINEST( ) in c/c++? | Bytes (7) Recognized Expert Moderator MVP

So basically what you want is simple linear regression? There exists formulas to calculate regressions.

Expand|Select|Wrap|Line Numbers

  1. y=ax+b
  2. a=r*s(y)/s(x)
  3. b=average(y)-a*average(x)
  4. s(z)=square_root(1/(N-1)*sigma((z-average(z))^2))
  5. n=samplesize
  6. r=sigma((x-average(x))*(y-average(y)))/square_root(sigma(x-average(x))^2)/square_root(sigma(y-average(y))^2)

That's the first level of formulas you will need. I don't think I need to go over how to calculate an average. r is pearson's coefficent and s is the standard deviation. Sigma is the mathematical symbol for summation where you calculate and add all values together.

Dec 12 '11 #3

reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 9495

Export to Excel

by: jeffgeorge |last post by:

I'm currently exporting a form to Excel. Because there are controls and totals in the header, I first have a button for users to convert to a datasheet. Then I use the automated quick office Export to Excel Link then I have a button which returns the user to a form view. It's a 3 step process with the user needing to Save As in Excel if they wish to keep the spreadsheet. Are there any other easier options? It seems I should be able...

Microsoft Access / VBA

17 6348

Excel Automation

by: Mansi |last post by:

I need to do some research on how to use excel automation from c#. Does anyone know of any good books related to this subject? Thanks. Mansi

C# / C Sharp

1 3494

Use Excel functions in C#

by: Scott P |last post by:

I am looking for a way to use several Excel functions (e.g. LINEST, LOGEST and RSQ) in C#. Do Microsoft or any third parties offer good tools to enable the use of such functions from within C# without having to launch or access Excel? If so, where may these be found? Thank you.

C# / C Sharp

2 21954

Excel Process ID

by: Powerguy |last post by:

Hi all, I am looking for a way to get the Process id (or a handle) of an EXCEL process created from within my code. For example when the following code is executed: Dim EXL As Excel.Application = New Excel.Application a new instance of EXCEL.EXE is created in the task manager.

Visual Basic .NET

1 6334

calling excel function LinEst from VB

by: jobxyz |last post by:

Hi I am trying to call the excel function linest from VB using automation. the call Slope1 = Excel.WorksheetFunction.Index(Excel.WorksheetFunction.LinEst(y, x),1) works fine as long as x is a one dimensional array.

Microsoft Access / VBA

2 7408

LINEST Function

by: GhanaShyam |last post by:

Hi, How can I use the LINEST functionality of Excel in my .NET code. Can I use the Excel interopability dll or should I write the function code? Thanks in Advance GS.

C# / C Sharp

4 10476

Replicating excel function LinEst in Access VBA

by: David_from_Chicago |last post by:

What I am trying to do is to simulate the LINEST functionality from Excel in Access through VBA. When I use LinEst in Excel I can get back five statistical results. Here are is the formula array I use: Slope{=LINEST(H72:H94,I72:I94,TRUE,TRUE)} SE{=LINEST(H72:H94,I72:I94,TRUE,TRUE)} RSquared{=LINEST(H72:H94,I72:I94,TRUE,TRUE)} F-Stat{=LINEST(H72:H94,I72:I94,TRUE,TRUE)}

Microsoft Access / VBA

4 11590

Excel reference

by: Looch |last post by:

Thanks in advance for any help. I'm having trouble with this code: Dim xlsApp As Excel.Application Dim xlsWB As Excel.Workbook xlsApp = New Excel.Application xlsApp.Visible = True ...... The problem is Excel.Application is not recognized. I have the Excell

Visual Basic .NET

10140

Problem With Comparison Operator <=> in G++

by: Oralloy |last post by:

Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...

C / C++

1 9935

The easy way to turn off automatic updates for Windows 10/11

by: Hystou |last post by:

Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...

Windows Server

9819

Discussion: How does Zigbee compare with other wireless protocols in smart home applications?

by: tracyyun |last post by:

Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...

General

8821

AI Job Threat for Devs

by: agi2029 |last post by:

Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...

Career Advice

1 7364

Access Europe - Using VBA to create a class based on a table - Wed 1 May

by: isladogs |last post by:

The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...

Microsoft Access / VBA

5268

Trying to create a lan-to-lan vpn between two differents networks

by: TSSRALBI |last post by:

Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

Networking - Hardware / Configuration

1 3916

transfer the data from one system to another through ip address

by: 6302768590 |last post by:

Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

C# / C Sharp

3 3519

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

3 2790

Comprehensive Guide to Website Development in Toronto: Expert Insights from BSMN Consultancy

by: bsmnconsultancy |last post by:

In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

General

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the page.

looking for a way to use  Excel LINEST( ) in c/c++? | Bytes (2024)

FAQs

Why is my Linest function not working? ›

Cause. The output returned from LINEST may be incorrect if one or more of the following conditions are true: The range of x-values overlaps the range of y-values. The number of rows in the input range is less than the number of columns in the total range (x-value plus y-value).

What is the difference between Linest and slope in Excel? ›

The SLOPE and INTERCEPT algorithm is designed to look for one and only one answer, and in this case there can be more than one answer. LINEST returns a value of 0. The LINEST algorithm is designed to return reasonable results for collinear data, and in this case at least one answer can be found.

What values does Linest give you? ›

The values returned by LINEST include slope, intercept, standard error values, and more, up to 10 different statistics in total.

How does Linest calculate standard error? ›

Standard error

This is computed by taking the square root of the residual sum of squares (see below) divided by the degrees of freedom (see below).

Why is Linest only giving one value? ›

If the LINEST function returns just one number (slope coefficient), most likely you have entered it as a regular formula, not an array formula.

Which methods are used to find the best fit line in regression? ›

The more precise method involves the least squares method. This is a statistical procedure to find the best fit for a set of data points by minimizing the sum of the offsets or residuals of points from the plotted curve. This is the primary technique used in regression analysis.

What is the best linear fit equation? ›

The equation of a line of best fit can be represented as y = m x + b , where m is the slope and b is the y-intercept.

How do you use the line function in Excel? ›

On the Insert tab, in the Illustrations group, click Shapes. Under Lines, right-click the line or connector that you want to add, and then click Lock Drawing Mode. Click where you want to start the line or connector, and then drag the cursor to where you want the line or connector to end.

How do you use the function to find the quartile in Excel? ›

If your data is in column A, then click any blank cell and type “=QUARTILE(A:A,1)” for the first quartile, “=QUARTILE(A:A,2)” for the second quartile, and “=QUARTILE(A:A,3)” for the third quartile.

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Jerrold Considine

Last Updated:

Views: 6301

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Jerrold Considine

Birthday: 1993-11-03

Address: Suite 447 3463 Marybelle Circles, New Marlin, AL 20765

Phone: +5816749283868

Job: Sales Executive

Hobby: Air sports, Sand art, Electronics, LARPing, Baseball, Book restoration, Puzzles

Introduction: My name is Jerrold Considine, I am a combative, cheerful, encouraging, happy, enthusiastic, funny, kind person who loves writing and wants to share my knowledge and understanding with you.