Question: MATLAB I have an array, SinRay. I want to replace the negative numbers with 0 using logical indexing, so that the vector length doesn't change.
MATLAB
I have an array, SinRay. I want to replace the negative numbers with 0 using logical indexing, so that the vector length doesn't change. I found that SinRay(SinRay < 0) = 0; works how I want it to. However, I have to assign this new array to SinPositive, which I don't understand how to do. Is it possible using the method illustrated? Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
