필터 지우기
필터 지우기

how to subtract a number from matrix

조회 수: 1 (최근 30일)
kyin gab
kyin gab 2013년 6월 18일
Hello,
I have a 8 X 8 matrix, m. I want to subtract 127 from it (ie from each number). I did it like this x = m - 127;
The problem I am getting is that it shows 0 where a number is supposed to be negative.
Is there something I am missing?
Thank you.
  댓글 수: 1
kyin gab
kyin gab 2013년 6월 18일
got it. I used x = double(m) - 127;

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by