Create a data file in the specified format

Assignment Help Basic Computer Science
Reference no: EM13308473

A file floatnums.dat has been created for use in an experiment. However, it contains float(real) numbers and what is desired instead is integers. Also, the file is not exactly in the correct format; the values are stored columnwise rather than rowwise. For example, if the file contains the following:

 

90.5792      27.8498     97.0593

12.6987      54.6882     95.7167

91.3376      95.7507     48.5376

63.2359      96.4889     80.0280

9.7540         15.7613     14.1886

 

what is really desired is:

 

91      13      91     63      10

28      55       96    96       16

97      96       49    80       14

 

Create a data file in the specified format. Write a script that would read from the file floatnums.dat into a matrix, round the numbers, and write the matrix in the desired format to a new file called "intnums.dat."

 

Reference no: EM13308473

Questions Cloud

At what speed is the moon traveling : The moon is 3.85Ã-10^8 m from Earth, and it takes 27.3 days to orbit Earth. At what speed is the moon traveling relative to Earth
Choose three macroeconomic variables to include in discussio : Suppose the U.S. economy is in a recession which came from a negative AD shock.  To provide consumers with an incentive to spend more of their disposable incomes, Congress and the President pass a law making it illegal for an individual to hold more ..
What pressure in psi is applied to water to reduce volume : At normal atmospheric conditions, approximately what pressure in psi must be applied to water 70 F to reduce its volume by 2 %
Determine the maximum possible value for the first player : Then two players take turns picking a coin from the sequence, but can only pick the first or the last coin of the (remaining) sequence. The goal is to collect coins of the largest total value. For this problem, n is even.
Create a data file in the specified format : Create a data file in the specified format. Write a script that would read from the file floatnums.dat into a matrix, round the numbers, and write the matrix in the desired format to a new file called "intnums.dat."
Determine is there any runoff from the area during the storm : During a 5 hour storm event, the precipitation over a 230-acre area is 1.5niches. There is constant infiltration at a rate of 0.12 inches/hour and the depession storage is 17 acre-ft. Is there any runoff from the area during the storm
How much volume of naoh solution is needed at poh at 9 : A NaOH solution has pOH at 8. How much volume of this NaOH solution is needed to prepare 1 L of a NaOH solution at pOH at 9.
Elaborate and apply to current events : Elaborate and apply to current events. Be sure to cite and demonstrate mastery.
What good outcomes as well as bad outcomes will result : Suppose the U.S. economy is in a recession and there is rising inflation.  Suppose you are in charge of monetary, fiscal, and exchange rate (i.e., influencing the value of the dollar) policies.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Calculate and plot value for inter-arrival time

Assume instead that there is constant inter-arrival time of 0.01 seconds between each consecutive arriving packet. In this case, calculate and plot value of R_tau (t) versus time in steady state for following cases: (i) tau = 0.1 second, (ii) tau..

  Determine maximum number of telephones end office support

With mean call duration of six minutes. Ten percent of calls are long distance. Determine the maximum number of telephones an end office can support?

  Design a digital filter with the following specifications

Design a digital filter with the following specifications: Cutoff frequency = 1,000 Hz Sampling rate = 16,000 Low-pass filter What is the digital normalized frequency in radians?

  Deterministic context free and context free grammar

Classify the languages given below as a) deterministic context free, b) context free but not deterministic, c) not context free. Give explanantion.

  Write a program to simulate the operation of a simple robot

Write a program to simulate the operation of a simple robot . the robot moves in fourdirections :forward , right , left. the job of the robot is to move items and place it in the right slots in each station. there are 8 stations plus the pick up stat..

  What do the terms syntactic sugar and syntactic salt mean

What do the terms "syntactic sugar" and "syntactic salt" mean? From your knowledge of the C# programming language, list at least five syntactic sugar and salt features.

  What is your opinion of the criteria used

Based on your understanding of how AES was chosen, what is your opinion of the criteria used?

  What are ids and ips

Write a 2-3 page paper that fully answers the questions.

  The case sstudy on an digital forensic investigation plan

As part of the auditing team in capacity of a Digital Forensics expert, your task is to prepare a report explaining the possible methods that can be adopted in this particular scenario, resources required for the methods chosen for this investigat..

  Develop a structure chart with a main module

Develop a structure (hierarchy) chart with a main module, submodules, the parameter variables, and reference in the reference variables in the parentheses as needed.

  Why can i only see up to the index of this book

Why can I only see up to the index of this book? I understand it's a large book and you may only want to give the reader access to part of the book, but if it's read only until I get my book in the mail, why can't I see the whole book

  Write an arm assembly function

Write an ARM assembly function that takes a string and two characters and returns a pointer to a new modified string. The first character is the character to replace and the second is the character to replace it with. The C program below changes t..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd