There doesn't appear to be any logic behind the choice of * vs .*, / vs ./, etc. If you don't understand the difference between the two and just try one or the other until it works, you're not going to go very far. Or if you don't know what is vector or scalar in your code, similarly, you'll have problems.
Few of the dotted operations in your expressions actually need to be dotted. But if you chose to dot the scalar expressions, then you should dot them all. Be consistent.
Also, note that a more concise way to write constants of the form 1.6*10^-19 (I removed the unnecessary dot) is 1.6e-19
As Adam said, you haven't told us what I_Short1 is, but it must be non-scalar for you to get an error. If so, your expressions should probably be:
SNR1 = I_p.^2 * M^2 ./ I_noise1;
Of course, I_noise1 must be a row vector with the same numbers of elements as K (7 elements).
By the way, why not:
K = -4:2:8;
K_w = 1e-3 * 10.^K;
Best Answer