필터 지우기
필터 지우기

Info

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

Code for Monotonically increasing function

조회 수: 1 (최근 30일)
Swati Sarangi
Swati Sarangi 2020년 11월 19일
마감: Stephen23 2020년 11월 19일
Hi All,
Can anyone check the following code snippet and tell me why it fails for the following test cases?
x = cumsum(rand(1,100));
x= [ -3 -2 -1 0 1 2 3]
function tf = mono_increase(x)
for ii=1:length(x)
for jj=(ii+1):length(x)
if x(ii)<x(jj)
tf = true;
else
tf = false;
end
end
end
end
I'm getting the desired result in my laptop but with the compiler of MATLAB , I'm getting error.
Please someone tell me how to resolve it.

답변 (0개)

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

Community Treasure Hunt

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

Start Hunting!

Translated by