[FileName,PathName] = uigetfile('padma_orignl.wav'); >> PathOriginal=sprintf('%s%s',PathName,FileName); >> [xt,fs]=wavread(PathOriginal); >> [FileName,PathName] = uigetfile('padma_delay.wav'); >> PathOriginal1=sprintf('%s%s',PathName,FileName); >> [yt,fs]=wavread(PathOriginal1); >> t=0:1/30897:1; >> plot(t,xt,t,yt) Error using plot Vectors must be the same lengths.
When i have recorded two sample wav files, one with no delay and other with delay, obviously there would be some difference in length. Could you please tell me how i could overcome this error?
Thanks in advance Padma
No products are associated with this question.
There are several things you can do, the simplest is probably
This assumes that your data is at least as long as t, otherwise you'll have to truncate your t.
If you want to go a little further, you can do
t1 = 0:1/30897:length(xt); t2 = 0:1/30897:length(yt); plot(t1,xt,t2,yt)