The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How To Calculate krishna_sicsr Shell Programming and Scripting 3 03-21-2009 01:49 PM
calculating variance in perl programming cdfd123 Shell Programming and Scripting 4 01-15-2008 01:30 AM
calculate from three files koti_rama Shell Programming and Scripting 5 01-08-2008 09:27 AM
How to calculate with awk whatisthis Shell Programming and Scripting 4 11-09-2005 12:39 PM
bc calculate problem Nicol UNIX for Dummies Questions & Answers 2 09-13-2004 10:21 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #8 (permalink)  
Old 01-09-2008
cdfd123 cdfd123 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 112
Post

Quote:
Originally Posted by shamrock View Post
So let me see if I understand your post. You need the mean & variance for every line of input and every one of those input lines has ten data values separated by the asterisk character and the first data value is a floating point number like 1.1 2.2 yada yada...correct me if I am wrong.
The code you have posted does not seem to be able to compute the mean and variance of every line of input.
Dear Shamrock,
Yes ,I need the mean and variance for every line of the input and every one of those input lines has ten data values separated by the asterisk character

But
first data value is just 1 2 4 22 211 22 12 22 22 11
and 1. and 2.is just a serial number and can be ignored for that
sorry for that incovenience
if that code not work what can be possible solution? Can u rewrite it?

Thanks
  #9 (permalink)  
Old 01-10-2008
shamrock shamrock is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2007
Location: USA
Posts: 741
Quote:
Originally Posted by cdfd123 View Post
Dear Shamrock,
Yes ,I need the mean and variance for every line of the input and every one of those input lines has ten data values separated by the asterisk character

But
first data value is just 1 2 4 22 211 22 12 22 22 11
and 1. and 2.is just a serial number and can be ignored for that
sorry for that incovenience
if that code not work what can be possible solution? Can u rewrite it?

Thanks
Now you have everything you need to write this code. It should be a relatively small program. Scan each line into 10 variables computing its mean and variance.
  #10 (permalink)  
Old 11-12-2008
cdfd123 cdfd123 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 112
calculate mean in C

Thanks

Last edited by cdfd123; 11-12-2008 at 02:21 AM..
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0