division

조회 수: 9 (최근 30일)
priya
priya 2011년 11월 27일
m = 255 n = 52995 when i do error = m/n it gives me 0 but when i write 255/52995 it gives me 0.0048. It is trivial but can anyone please point out where I am going wrong.
  댓글 수: 1
David Young
David Young 2011년 11월 27일
I don't get that result. Please could you cut and paste the relevant part of your MATLAB session, including your commands and the results, so that we can see what is happening. (Please put a space at the start of each line so that it is formatted.)

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

답변 (1개)

bym
bym 2011년 11월 27일
is n an integer?
cast(n,'uint8')/m
ans =
0
n/m
ans =
0.0048

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by