Sponsored Content
Top Forums Shell Programming and Scripting Implementing Listagg like function in shell Post 302976319 by RudiC on Tuesday 28th of June 2016 04:02:15 AM
Old 06-28-2016
You need to become more specific. As I said, the example DOESN'T fit.
 

10 More Discussions You Might Find Interesting

1. Programming

Implementing a shell

I'm implementing a shell in C that supports piping, output redirection, and background processing, and a few other commands. I was wondering how I'd go about implementing the output redirection. So, I'd open a file and I'd fork and execute the command. But how would I get stdout into the file? Any... (10 Replies)
Discussion started by: ununium
10 Replies

2. Programming

need help in implementing simple interactive shell in C

hello all, i hv attached herewith my program to implement a simple interactive shell in C. no matter hw hard I try, I keep getting some errors. i need help - urgently !! proj1test7.c: In function `parseCommand': proj1test7.c:102: warning: assignment makes pointer from integer without a cast... (2 Replies)
Discussion started by: nix1209
2 Replies

3. Programming

Implementing a shell in C

Hi, I am implementing a shell in C, with the following problem... Suppose the shell is invoked from the command line as >> myshell < test.in > test.out 2>&1 I have to execute the commands in test.in and redirect them to test.out How does one detect in the main function that the shell... (1 Reply)
Discussion started by: jacques83
1 Replies

4. Homework & Coursework Questions

implementing mkdir, chdir, mv, pwd inside a shell !

1. The problem statement, all variables and given/known data: need to implement mkdir, chdir, mv, pwd given a shell.cpp directory.cpp and some other files this shell missing these commands, and i need to implement them inside the shell 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: evantheking
0 Replies

5. Shell Programming and Scripting

Implementing Queue Using Shell scripts

HI I want to implement a control mechanism using Shell scripts .The intention is to have controlled number of jobs running in parallel External process will kickstart 40 jobs in parallel .All the 40 jobs will call the same generic script with different parameter values .But at a... (4 Replies)
Discussion started by: police
4 Replies

6. Programming

Problem with implementing the times() function in C (struct tms times return zero/negative values)

Hello, i'm trying to implement the times() function and i'm programming in C. I'm using the "struct tms" structure which consists of the fields: The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process. The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies

7. Programming

Implementing function outside struct

I have this code where I have declared a struct with some functions. Trying to write the function implementation outside the struct declaration and do not know how to proceed. #ifndef ParseEl_hh #define ParseEl_hh #include <iostream> #include <fstream> #include "DynBaseObj.hh"... (7 Replies)
Discussion started by: kristinu
7 Replies

8. Shell Programming and Scripting

Need help implementing a timout in my Shell Script for RHEL6

Hey Guys, My problem: I have a script that will be querying the database every minute to see if it gets a response, the response its querying for is "UP" in a table i made called dbup in the database. Now, I am trying to add the component to implement a timeout if the script does not get a... (2 Replies)
Discussion started by: mo_VERTICASQL
2 Replies

9. Shell Programming and Scripting

Implementing linked list in shell scripting

Hello Experts, Is it possible to implement linked list in shell scripting? is yes then how can we do it? Any working example is highly appreciated. Thanks in advance. (4 Replies)
Discussion started by: mukulverma2408
4 Replies

10. UNIX for Beginners Questions & Answers

DB2 Query modification to remove duplicate values using LISTAGG function

I am using DB2 v9 and trying to get country values in comma seperated format using below query SELECT distinct LISTAGG(COUNTRIES, ',') WITHIN GROUP(ORDER BY EMPLOYEE) FROM LOCATION ; Output Achieved MEXICO,UNITED STATES,INDIA,JAPAN,UNITED KINGDOM,MEXICO,UNITED STATES The table... (4 Replies)
Discussion started by: Perlbaby
4 Replies
Linfit(3)						User Contributed Perl Documentation						 Linfit(3)

NAME
PDL::Fit::Linfit - routines for fitting data with linear combinations of functions. DESCRIPTION
This module contains routines to perform general curve-fits to a set (linear combination) of specified functions. Given a set of Data: (y0, y1, y2, y3, y4, y5, ...ynoPoints-1) The fit routine tries to model y as: y' = beta0*x0 + beta1*x1 + ... beta_noCoefs*x_noCoefs Where x0, x1, ... x_noCoefs, is a set of functions (curves) that the are combined linearly using the beta coefs to yield an approximation of the input data. The Sum-Sq error is reduced to a minimum in this curve fit. Inputs: $data This is your data you are trying to fit. Size=n $functions 2D array. size (n, noCoefs). Row 0 is the evaluation of function x0 at all the points in y. Row 1 is the evaluation of of function x1 at all the points in y, ... etc. Example of $functions array Structure: $data is a set of 10 points that we are trying to model using the linear combination of 3 functions. $functions = ( [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], # Constant Term [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], # Linear Slope Term [ 0, 2, 4, 9, 16, 25, 36, 49, 64, 81] # quadradic term ) SYNOPSIS
$yfit = linfit1d $data, $funcs FUNCTIONS
linfit1d 1D Fit linear combination of supplied functions to data using min chi^2 (least squares). Usage: ($yfit, [$coeffs]) = linfit1d [$xdata], $data, $fitFuncs, [Options...] Signature: (xdata(n); ydata(n); $fitFuncs(n,order); [o]yfit(n); [o]coeffs(order)) Uses a standard matrix inversion method to do a least squares/min chi^2 fit to data. Returns the fitted data and optionally the coefficients. One can thread over extra dimensions to do multiple fits (except the order can not be threaded over - i.e. it must be one fixed set of fit functions "fitFuncs". The data is normalised internally to avoid overflows (using the mean of the abs value) which are common in large polynomial series but the returned fit, coeffs are in unnormalised units. # Generate data from a set of functions $xvalues = sequence(100); $data = 3*$xvalues + 2*cos($xvalues) + 3*sin($xvalues*2); # Make the fit Functions $fitFuncs = cat $xvalues, cos($xvalues), sin($xvalues*2); # Now fit the data, Coefs should be the coefs in the linear combination # above: 3,2,3 ($yfit, $coeffs) = linfit1d $data,$fitFuncs; Options: Weights Weights to use in fit, e.g. 1/$sigma**2 (default=1) perl v5.8.0 2000-12-06 Linfit(3)
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy