Sponsored Content
Operating Systems Solaris CSHRC and PATH problem please help Post 302994963 by RudiC on Thursday 30th of March 2017 06:51:03 AM
Old 03-30-2017
Suffers from r-mnesia, maybe?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cc path problem - no acceptable path found

Hello everyone, I'm a unix noob. I have a powerbook running mac os x 10.4 and for one of my classes I need to install the latest version of php (5.0.5). I'm following the instructions at http://developer.apple.com/internet/opensource/php.html to install but I've run into a problem. The... (2 Replies)
Discussion started by: kendokendokendo
2 Replies

2. Shell Programming and Scripting

path problem

hi , i have written csh script i am unable to set PATH variable in my script. my script is like this ===================================== # ! /bin/csh -f setenv PATH "$PATH:/opt/terascan/bin" ls -l > list lspass > pas peekauto > schedule \ num_days = 1 \ exit 0... (1 Reply)
Discussion started by: rajan_ka1
1 Replies

3. UNIX for Advanced & Expert Users

path problem

Hi i am writing a script containing processing commands which are reside in /opt/terascan/bin dir. if i run the script from command prompt it is working fine. but in crontab it is not working. if i give env command from command prompt it is showing /opt/terascan/bin dir in PATH variable. ... (10 Replies)
Discussion started by: rajan_ka1
10 Replies

4. UNIX for Dummies Questions & Answers

word too long..problem while sourcing .cshrc

I am setting my PATH & LD_LIBRARY_PATH through .cshrc file while sourcing it on a old shell i am getting the error word too long .and the changes which i anm doing doesn't get updated . i am in a multi user environment so the only way to do the changes only for my shell is to do it that way. ... (1 Reply)
Discussion started by: mobydick
1 Replies

5. Infrastructure Monitoring

Problem with PATH

On one of the machines at work, we had Net-SNMP 5.2.3 installed, and I wanted to upgrade that to 5.4.2.1. So I downloaded the tar file, extracted it, did the configure, make, make test, make install, and everything worked. All the executable files (like snmpget, snmpset, snmpwalk) got copied to... (1 Reply)
Discussion started by: sllinux
1 Replies

6. Shell Programming and Scripting

Problem with my .cshrc

Hello everyone, I write a ~/.cshrc for set class path to run my java application. The file is listed below. setenv YFILTER_HOME ~/yfilter-2.0 setenv PATH "$YFILTER_HOME/bin:$PATH" setenv CLASSPATH... (1 Reply)
Discussion started by: perl0101
1 Replies

7. Shell Programming and Scripting

alias defining problem in .cshrc file

Hi folks, I'm trying to define the following command as alias in .cshrc file: ls -ltr | grep ^d | awk '{print $9}' | xargs du -hs I defined it as the following: alias nirdirs '`ls -ltr | grep "^d" | awk "{print \\$9}" | xargs du -hs`' I've got the following error when I've run the alias:... (7 Replies)
Discussion started by: nir_s
7 Replies

8. Shell Programming and Scripting

if PATH contains a certain string problem!

Hi I am using MKS Toolkit c shell. I want to basically check if my PATH variable already contains a certain path directory so I tried this (it didnt work!): if: Expression Syntax if ( echo $path |grep -c c:/PROGRA~1/blah/blah ) then please help me get this little statement to work. ... (3 Replies)
Discussion started by: vas28r13
3 Replies

9. Shell Programming and Scripting

Problem with PATH

Recently I lost a number of changes I made to a program when the SCO Unix system went down. The system "mail" suggested a "vi -r" option that took me back several days. To prevent this in the future, I am trying to create my own vi command: if then cp -p $1 $1.bak fi /usr/bin/vi $* if ... (5 Replies)
Discussion started by: wbport
5 Replies

10. UNIX for Beginners Questions & Answers

PATH problem

For the sake of not going insane and not buggering a load of needed system stuff, I have created a dir /mybin. (This is a Debian system.) I have then edited the /etc/profile and /etc/login.defs files and added :/mybin to all of the path variables. I have the file /mybin/mtp for... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies
LM(3)							User Contributed Perl Documentation						     LM(3)

NAME
PDL::Fit::LM -- Levenber-Marquardt fitting routine for PDL DESCRIPTION
This module provides fitting functions for PDL. Currently, only Levenberg-Marquardt fitting is implemented. Other procedures should be added as required. For a fairly concise overview on fitting see Numerical Recipes, chapter 15 "Modeling of data". SYNOPSIS
use PDL::Fit::LM; $ym = lmfit $x, $y, $sig, &expfunc, $a, {Maxiter => 300}; FUNCTIONS
lmfit Levenberg-Marquardt fitting of a user supplied model function ($ym,$a,$covar,$iters) = lmfit $x, $y, $sig, &expfunc, $a, {Maxiter => 300, Eps => 1e-3}; Options: Maxiter: maximum number of iterations before giving up Eps: convergence citerium for fit; success when normalized change in chisquare smaller than Eps The user supplied sub routine reference should accept 4 arguments o a vector of independent values $x o a vector of fitting parameters o a vector of dependent variables that will be assigned upon return o a matrix of partial derivatives with respect to the fitting parameters that will be assigned upon return As an example take this definition of a single exponential with 3 parameters (width, amplitude, offset): sub expdec { my ($x,$par,$ym,$dyda) = @_; my ($a,$b,$c) = map {$par->slice("($_)")} (0..2); my $arg = $x/$a; my $ex = exp($arg); $ym .= $b*$ex+$c; my (@dy) = map {$dyda->slice(",($_)")} (0..2); $dy[0] .= -$b*$ex*$arg/$a; $dy[1] .= $ex; $dy[2] .= 1; } Note usage of the ".=" operator for assignment In scalar context returns a vector of the fitted dependent variable. In list context returns fitted y-values, vector of fitted parameters, an estimate of the covariance matrix (as an indicator of goodness of fit) and number of iterations performed. An extended example script that uses lmfit is included below. This nice example was provided by John Gehman and should help you to master the initial hurdles. It can also be found in the Example/Fit directory. use PDL; use PDL::Math; use PDL::Fit::LM; use strict; ### fit using pdl's lmfit (Marquardt-Levenberg non-linear least squares fitting) ### ### `lmfit' Syntax: ### ### ($ym,$a,$covar,$iters) ### = lmfit $x, $y, $sig, &fn, $initp, {Maxiter => 300, Eps => 1e-3}; ### ### Explanation of variables ### ### OUTPUT ### $ym = pdl of fitted values ### $a = pdl of paramters ### $covar = covariance matrix ### $iters = number of iterations actually used ### ### INPUT ### $x = x data ### $y = y data ### $sig = weights for y data (can be set to scalar 1 for equal weighting) ### &fn = reference to function provided by user (more on this below) ### $initp = initial values for floating parameters ### (needs to be explicitly set prior to use of lmfit) ### Maxiter = maximum iterations ### Eps = convergence criterium (maximum normalized change in Chi Sq.) ### Example: # make up experimental data: my $xdata = pdl sequence 5; my $ydata = pdl [1.1,1.9,3.05,4,4.9]; # set initial prameters in a pdl (order in accord with fit function below) my $initp = pdl [0,1]; # Weight all y data equally (else specify different weights in a pdl) my $wt = 1; # Use lmfit. Fourth input argument is reference to user-defined # subroutine ( here &linefit ) detailed below. my ($yf,$pf,$cf,$if) = lmfit $xdata, $ydata, $wt, &linefit, $initp; # Note output print " XDATA $xdata Y DATA $ydata Y DATA FIT $yf "; print "Slope and Intercept $pf COVARIANCE MATRIX $cf "; print "NUMBER ITERATIONS $if "; # simple example of user defined fit function. Guidelines included on # how to write your own function subroutine. sub linefit { # leave this line as is my ($x,$par,$ym,$dyda) = @_; # $m and $b are fit parameters, internal to this function # call them whatever make sense to you, but replace (0..1) # with (0..x) where x is equal to your number of fit parameters # minus 1 my ($m,$b) = map { $par->slice("($_)") } (0..1); # Write function with dependent variable $ym, # independent variable $x, and fit parameters as specified above. # Use the .= (dot equals) assignment operator to express the equality # (not just a plain equals) $ym .= $m * $x + $b; # Edit only the (0..1) part to (0..x) as above my (@dy) = map {$dyda -> slice(",($_)") } (0..1); # Partial derivative of the function with respect to first # fit parameter ($m in this case). Again, note .= assignment # operator (not just "equals") $dy[0] .= $x; # Partial derivative of the function with respect to next # fit parameter ($b in this case) $dy[1] .= 1; # Add $dy[ ] .= () lines as necessary to supply # partial derivatives for all floating paramters. } tlmfit threaded version of Levenberg-Marquardt fitting routine mfit tlmfit $x, $y, float(1)->dummy(0), $na, float(200), float(1e-4), $ym=null, $afit=null, &expdec; Signature: tlmfit(x(n);y(n);sig(n);a(m);iter();eps();[o] ym(n);[o] ao(m); OtherPar => subref) a threaded version of "lmfit" by using perl threading. Direct threading in "lmfit" seemed difficult since we have an if condition in the iteration. In principle that can be worked around by using "where" but .... Send a threaded "lmfit" version if you work it out! Since we are using perl threading here speed is not really great but it is just convenient to have a threaded version for many applications (no explicit for-loops required, etc). Suffers from some of the current limitations of perl level threading. BUGS
Not known yet. AUTHOR
This file copyright (C) 1999, Christian Soeller (c.soeller@auckland.ac.nz). All rights reserved. There is no warranty. You are allowed to redistribute this software documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. perl v5.8.0 2002-05-09 LM(3)
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy