Matlab Error : Matrix dimension must agree -


error using / matrix dimensions must agree.

error in nusrat (line 13) a0=1/(r+v.*t)

clc clear close r=1.5*1000 d=2*1000 v=(60*1000)/3600 w=10^6 t=0:1/w:0.02 c=3*10^8 tou0=(r+v.*t)/c tou1=(2*d-r-v.*t)/c td=tou1-tou0 a0=1/(r+v.*t) a1=1/(2*d-r-v.*t) fc=900*10^6 phi1=-2*pi*fc*tou1 phi0=-2*pi*fc*tou0 l= ceil(td*w) hl= a1.* exp(1j.*phi1).*sinc(l-(tou1.*w))+ a0.* exp (1j.*phi0).*sinc(l-tou0.*w) plot(t*w,abs(hl)) 

just, change code this.

a0=1./(r+v.*t); a1=1./(2*d-r-v.*t); 

when divide scalar array, ./ correct operator.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -