How to fix If && statement for array?

조회 수: 1 (최근 30일)
Riley
Riley 2014년 10월 2일
답변: Riley 2014년 10월 2일
I am trying to get this to work:
if all(' rawdata > colmax && rawdata > rowmax'); midpointmap = greaterthan (this equals one);
end
disp(midpointmap);
midpointmap is set to all zeros as of now
all ive managed to get is either all zeros or just a single number one.
any ideas how to fix this?
  댓글 수: 1
Stephen23
Stephen23 2014년 10월 2일
The code you have given would not work. Please edit your question and use the text formatting tools (above the text box) to display your exact code. Please provide us with more information, in particular:
  • Why have you entered the input argument to the function all as a string?
  • The size of rawdata , colmax, and rowmax (scalar, matrix, etc).
  • What does "this equals one" mean?
  • What is greaterthan ?
  • What is the output that you need? We cannot "fix" the current output if we don't even know what the "right" output is.

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

답변 (1개)

Riley
Riley 2014년 10월 2일
ok so I got rid of the all part
if rawdata > colmax && rawdata > rowmax;
midpointmap(maxrows,maxcols) = greaterthan (this equals one);
end
disp(midpointmap);
Raw data is a 19 * 19 array colmax is 19 the number of

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by