I'm a bit of a beginner with Matlab. I have an array P, and a single value P0. What I need to do is check P0 against every value in P. If P>=P0, y=1-(P0/P), otherwise y=0.
Here is a code I've written:
However, all it does is plot a straight line along the x-axis. Can anyone see what might be wrong with my code.