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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!