On 2/21/2014 7:19 AM, gasmi wrote: > Hi, > when I run my code this error appears "??? Error using ==> plus Matrix > dimensions must agree. > Error in ==> code at 29 > y = yppm + 10^(-Eb_N0_dB(ii)/20)*n;" > knowing that; > yppm <1*2101 double> > Eb_N0_dB <1*14 double> > ii 1 > n <1*100000 double> > please I need your helps and I'll be gratful.
Well, with such disparate sizes I don't know what you expect to be able to do...you can't very well expect Matlab to know what to do when you try to add 14 values to some 2000 and then multiply those by 100000 others.
Also note that '*' is a matrix multiply, not element-wise. Need the "dot" operators .* and the like for that.
But, you're going to have to somehow get the dimensions commensurate to get anywhere. Only you can know what those should be for your problem.