Hi all,
I tried to find 'range' of a matrix but always return error. For example;
Data=rand(10,10)
range(Data,'all') always return the follwing error;
''Error using max
Invalid option. Option must be 'omitnan' or 'includenan'.
Error in range (line 20)
y = max(x,[],dim) - min(x,[],dim);''
Does anyone knows whats the problem please?
thanks

 채택된 답변

Stephan
Stephan 2019년 3월 25일
편집: Stephan 2019년 3월 25일

1 개 추천

Hi,
the option
'all'
was introduced in R2018b - in earlier releases you can not use this feature. Make sure to look in the documentaion that corresponds to the release you use to avoid this issues.
Best regards
Stephan

댓글 수: 5

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 25일
Here says
Introduced before R2006a
madhan ravi
madhan ravi 2019년 3월 25일
@Kalyan: Stephen is right.
AUWAL ABUBAKAR
AUWAL ABUBAKAR 2019년 3월 25일
Thanks for your response. But I am using 2017b
madhan ravi
madhan ravi 2019년 3월 25일
So use:
range(Data(:))
AUWAL ABUBAKAR
AUWAL ABUBAKAR 2019년 3월 25일
Thanks Ravi. That solves my problem.
@ Stephan, that really helps. is not available on 2017b
Thank you all.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

AUWAL ABUBAKAR
AUWAL ABUBAKAR 2019년 3월 25일

0 개 추천

Opppsss! my variables is an output coming from a loop.
example; ROI(:,:,1)=rand(10,10)
i tried using
range(ROI(:,:,2)(:)) but it failed.
Any i dea please? THANKS

댓글 수: 1

Stephan
Stephan 2019년 3월 25일
% 2D Array
ROI=rand(10,10)
Range1 = range(ROI(:))
% 3D Array
ROI=rand(10,10,3)
Range2 = range(ROI(:))

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2019년 3월 25일

댓글:

2019년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by