Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8010779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:50:33+00:00 2026-06-04T18:50:33+00:00

I often use Octave to create data that I can plot from my lab

  • 0

I often use Octave to create data that I can plot from my lab results. That data is then fitted with some function in gnuplot:

f1(x) = a * exp(-x*g);
fit f1(x) "c_1.dat" using 1:2:3 via a,g

That creates a fit.log:

*******************************************************************************
Tue May  8 19:13:39 2012


FIT:    data read from "e_schwach.dat" using 1:2:3
        format = x:z:s
        #datapoints = 16
function used for fitting: schwach(x)
fitted parameters initialized with current variable values



 Iteration 0
 WSSR        : 12198.7           delta(WSSR)/WSSR   : 0
 delta(WSSR) : 0                 limit for stopping : 1e-05
 lambda   : 14.2423

initial set of free parameter values

mu2             = 1
omega2          = 1
Q2              = 1

After 70 iterations the fit converged.
final sum of squares of residuals : 46.0269
rel. change during last iteration : -2.66463e-06

degrees of freedom    (FIT_NDF)                        : 13
rms of residuals      (FIT_STDFIT) = sqrt(WSSR/ndf)    : 1.88163
variance of residuals (reduced chisquare) = WSSR/ndf   : 3.54053

Final set of parameters            Asymptotic Standard Error
=======================            ==========================

mu2             = 0.120774         +/- 0.003851     (3.188%)
omega2          = 0.531482         +/- 0.0006112    (0.115%)
Q2              = 17.6593          +/- 0.7416       (4.199%)


correlation matrix of the fit parameters:

               mu2    omega2 Q2     
mu2             1.000 
omega2         -0.139  1.000 
Q2             -0.915  0.117  1.000 

Is there some way to get the parameters and their error back into Octave? I mean I can write a Python program that parses that, but I hoped to avoid that.

Update

This question is not applicable to me any more, since I use Python and matplotlib for my lab work now, and it can does all this from a single program. I leave this question open in case somebody else has the same problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:50:34+00:00Added an answer on June 4, 2026 at 6:50 pm

    I don’t know much about the gnuplot-Octave interface, but what can make your (parsing) life easier is you can:

    set fit errorvariables
    fit a*x+g via a,g
    set print "fit_parameters.txt"
    print a,a_err
    print g,g_err
    set print
    

    Now your variables and their respective errors are in the file “fit_parameters.txt” with
    no parsing needed from python.

    from the documentation on fit:

    If gnuplot was built with this option, and you activated it using set
    fit errorvariables
    , the error for each fitted parameter will be
    stored in a variable named like the parameter, but with _err
    appended. Thus the errors can be used as input for further
    computations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often use git from Terminal on Mac to download some repositories and then
I often use java.lang.Integer as primary key. Here you can see some piece of
I often use MS Excel's Get External Data to create simple reports - running
When databinding my xaml to some data I often use the get part of
I often use the execv() function in C++, but if some of the arguments
I often use simple Chinese phrases like 你好 to test that my code can
I often use convenience functions that return pointers to static buffers like this: char*
I quite often use Drupal's Views Module to build SQL that I paste into
In my models I often use text fields that are intended to contain large
I often use print_r($value, true) to dump some variables in log statements, and sometimes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.