The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 5 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
MATLAB question:
A file "floatnums.dat" has been created for use in an experiment. However it contains float(real) numbers and what is desired is integers. also, the fie 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 the 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,
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll