MATLAB: Matlab does not plot the function, why

matlab function

Hi want this function to plot but i'm getting no error or a curve…
rLP = 0:1:200;
PrL = rLP * 9 /(rLP+12);
plot(rLP, PrL); grid;

Best Answer

You need to do element-wise division (use ‘./’ instead of ‘/’:
PrL = rLP * 9 ./ (rLP+12);
See the documentation on Array vs. Matrix Operations (link) for detials.