# plotting the data in matlab: plot(cvi_data) # saving the data to a file fid = fopen('carla_sl', 'w') fprintf(fid, '%d\n', cvi_data) fclose(fid)
# plotting the frequency data: transform = fft(cvi_data); # complex numbers magnitude = abs(transform); # magnitude of the spectrum dbmag = 20 * log10(magnitude); # convert to dB y-axis scale (a log scaling) dbmag = 20 * log10(abs(fft(cvi_data))); # doing it all in one step dbmagpos = dbmag(1:1024); # keep only positive frequencies # from 0 Hertz to 512/2 = 256 Hertz plot(dbmagpos); # saving the data to a file fid = fopen('carla_fq', 'w') fprintf(fid, '%d\n', dbmagpos) fclose(fid)
CS 377B: HCI Technology Stanford University, Fall98 |
EE/CompE 2961: HCI Design San José State University, Fall98 |
CS 436: HCI Technology Princeton University, Fall98 |