ECE257 Quiz 3 - ECE257 Quiz 3 Date Wednesday week 8 Time...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE257 Quiz 3 Date: 2/27/08, Wednesday, week 8 Time: 7:20 – 7:50 p.m. Total Points: 134 points Total Grade Points: 5 grade points Variations of comparevar.m and the related formattedvar.dat and unformattedvar.dat 1. (35%) On Monday 2/25/08, I have shown my variation of compare.m called comparevar.m which generates smaller files formattedvar.dat and unformattedvar.dat that can be viewed using DOS Debug command. In my comparevar.m, I changed the line out_array = randn(1,10000); to out_array =[1 2 3 4 5 6 7 8 9 10]; Hence the output reduces from 10,000 numbers from 10 integers 1 through 10.Note I also changed the output format and data format: For example: count = fwrite(fid,out_array,'float64') ; is changed to count = fwrite(fid,out_array,'int32');. Hence 64 bits sngle precision floating numbers are changed to 32 bits integers. (a) My unformattedvar.dat file is of 40 bytes long with 10 integers. Modify comparevar.m to a new file comparevar2.m where the unformatted output data is 20 bytes long instead of 40 bytes.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern