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

Info iconThis 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. Remember that using Debug command, the unformattedvar.dat is displayed like: (you use
Background image of page 1

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

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

This note was uploaded on 04/21/2008 for the course ECE 257 taught by Professor Chandra during the Spring '08 term at Cal Poly Pomona.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online