Index in position 2 exceeds array bounds (must not exceed 1) error while comparing an array with a value
Show older comments
Hi I am trying to compare each element in my column vector 'Energy' with the electrolyser size and then create another column vector called FLH where if the value of energy is greater than or equal to 5 then replace with 5 if it is less copy the same value in energy to FLH but I receive the error Index in position 2 exceeds array bounds (must not exceed 1) I do not know how to resolve this. Thank you for your help!

Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!