RSS Forums RSS
Please support our Shell Scripting advertiser: Programming Forums
Views: 1538 | Replies: 0
Reply
Join Date: Jul 2005
Posts: 2
Reputation: rhnaeco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rhnaeco rhnaeco is offline Offline
Newbie Poster

Help refering to individual fields in separate lines

  #1  
Jul 25th, 2005
I am trying to use Simpson's Law to find the area in some profiles i have and i'd like to do this in a in a shell script as this how the data has been created.
an example of the file ( without the brackets):
(1) (2)
(a) 12.146 -0.65
(b) 12.146 -0.67
(c) 12.147 -0.71
(d) 12.147 -0.78
etc
etc
I need to use this formula:

a2 + 4 *( b2 + c2)

so that i have a third column like:

(1) (2)
(a) 12.146 -0.65 1.59 a2 + 4 *( b2 + c2)
(b) 12.146 -0.67
(c) 12.147 -0.71 -0.43 c2 + 4 *( d2 + e2)
(d) 12.147 -0.78

i know it can be done in matlab- but is there any way of doing this in awk or any other shell programs ?
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:19 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC