How to make vector array value zero after certain index?

조회 수: 11 (최근 30일)
Afraz Khalid
Afraz Khalid 2021년 1월 31일
댓글: madhan ravi 2021년 1월 31일
Dear All,
I have an array from Simlunk which is 1001x4.
The first, second, third and fourth colum of array conatins the value of current, voltagee, Irradaince and Temperature.
Let say at index (555,1), the value of current start to becomes negative and keep on going in negative domain.
How do I make the value of current and volatge zero once the current start to get negative i.e. after value of current at (555,1)?

답변 (1개)

madhan ravi
madhan ravi 2021년 1월 31일
Matrix(556 : end, 1 : 2) = 0 % size 1001 X 4

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by