Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

max function does not work with zero

조회 수: 1 (최근 30일)
Søren Schwartz
Søren Schwartz 2015년 11월 18일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello I am trying to use the max function, but it will not work. I have attached my log file. I have tried using this function maxStcev=max(Stcev'-K,0); (line 52), but I keep getting negative values.
I have then tried using a for loop with if statement, but this results in error: "Index exceeds matrix dimensions.
Error in mccev (line 45) if (M1(1,o)<0)" Can someone see what I am doing wrong? I want t have a vector only with positive values. Regards, Søren

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by