A Large Percent Problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting A Large Percent Problem
# 1  
Old 04-04-2013
Question A Large Percent Problem

Hello everyone,

I have two matrices at same sizes. I need to re-calculate the numbers in matrix A according to the percentages in martix B

it is like

matrix A is

Code:
 10.00  20.00  30.00  40.00  
 60.00  70.00  80.00  90.00
 20.00  30.00  80.00  50.00

martix B is

Code:
 00.08  00.05  00.06  00.07
 00.05  00.06  00.08  00.06
 00.02  00.01  00.09  00.07

Matrix C should be calculated like

Code:
10+(10*0.08) 20+(20*0.05) 30+(30+0.06) 40+(40+0.07)
60+(60*0.05) 70+(70*0.06) 80+(80*0.08) 90+ (90*0.06)
20+(20*0.02) 30+(30*0.01) 80+(80*0.09) 50+(50*0.07)

and the result should look like

Code:
 10.80  21.00  31.80  42.80
 63.00  74.20  86.40  95.40
 20.04  30.30  87.20  53.50

There are no number larger then 99. there is 2 digit before and after the dots. and 2 spaces between the numbers

I know it is possible but my knowledge is not enough to solve this porblem with csh and I have also very limited time so someone please help me Smilie
# 2  
Old 04-04-2013
Is this homework?
# 3  
Old 04-04-2013
If not homework; repost with explanation of reasoning for the prorgamming

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

a problem with large files

hello all, kindly i need your help, i made a script to print a specific lines from a huge file about 3 million line. the output of the script will be about 700,000 line...the problem is the script is too slow...it kept working for 5 days and the output was only 200,000 lines !!! the script is... (16 Replies)
Discussion started by: m_wassal
16 Replies

2. UNIX for Dummies Questions & Answers

Large Problem with nautilus

Hi, I am a torrent-maniak and I use Transmission. All things were good but Nautilus begun to show problem while I was runnning Transmission.Its situation was becoming worse and worse. Now, when I boot I can hardly open a nautilus window and browse my files.It will "stack" in seconds for sure! I... (2 Replies)
Discussion started by: hakermania
2 Replies

3. UNIX for Dummies Questions & Answers

Large file problem

I have a large file, around 570 gb that I want to copy to tape. However, my tape drive will load only up to 500 gb. I don't have enough space on disk to compress it before copying to tape. Can I compress and tar to tape in one command without writing a compressed disk file? Any suggestions... (8 Replies)
Discussion started by: iancrozier
8 Replies

4. UNIX for Advanced & Expert Users

Large file FTP problem

We are experiencing a problem on a lengthy data transfer by FTP through a firewall. Since there are two ports in use on a ftp transfer (data and control), one sits idle while the other's transfering data. The idle port (control) will get timed out and the data transfer won't know that it's... (3 Replies)
Discussion started by: rprajendran
3 Replies

5. UNIX for Dummies Questions & Answers

problem while making ftp of a large file

Hi Friends, I'mfacing a problem while doing ftp of a large file.The control session is getting closed after sometime.But data session transfers the file successfully even when the control seeion is lost.I need to make the control session available as long as data session is active. How can i... (1 Reply)
Discussion started by: rprajendran
1 Replies

6. Shell Programming and Scripting

problem with 0 byte and large files

how to remove all zero byte files in a particular directory and also files that are morew than 1GB. pLEASE let me know (3 Replies)
Discussion started by: dsravan
3 Replies

7. Shell Programming and Scripting

Problem with parsing a large file

Hi All, Following is the sample file and following is the op desired that is the last entry of each unique first field is required. My solution is as follows However the original file has around a million entries and around a 100,000 uniques first fields, so this soln.... (6 Replies)
Discussion started by: gauravgoel
6 Replies

8. Shell Programming and Scripting

Problem in processing a very large file.

Hi Friends, Getting an error while processing a very large file using an sqlloader........ The file is larger than 2 GB. Now need to change the compiler to 64-bit so that the file can be processed. Is there any command for the same. Thanks in advance. (1 Reply)
Discussion started by: Rohini Vijay
1 Replies

9. UNIX for Advanced & Expert Users

Large file transfer problem

Hello Everyone, I can't transfer a large file (~15GB TAR Archive) from one linux machine to another via FTP. I have tried the following: 1) Normal FTP the whole 15GB. This stops when it gets to about 2GB and doesn't go any further. 2) Split the 15GB file into 500MB pieces using the... (1 Reply)
Discussion started by: VVV
1 Replies
Login or Register to Ask a Question