why matlab rounding the result itself?
Show older comments
my code is given below-
w=imread('win.png');%its a 32X32 picture
for i=1:32
for j=1:32
wrr(i,j)=w(i,j)*.02;
end
end
disp('wrr');
disp(wrr);
the problem is- its rounding the pixel values,like if w(i,j)=178 then after multiplication with .02 wrr(i,j)=4 where it should be 3.56. i need the floating point for further work. can anyone help?
7 Comments
anika hossain
on 19 Aug 2015
Star Strider
on 19 Aug 2015
I’m completely lost. I have no idea what you’re doing.
anika hossain
on 19 Aug 2015
Star Strider
on 19 Aug 2015
Guessing what your code is doing is extremely difficult for me. Perhaps posting it would help.
Walter Roberson
on 19 Aug 2015
How are you doing the writing to the file?
Star Strider
on 19 Aug 2015
I’m not familiar enough with wavelets or watermarking to answer. Please post this as a new Question, so those with the necessary background can see it and respond to it.
I will delete it from this Question in a few days.
anika hossain
on 19 Aug 2015
Accepted Answer
More Answers (0)
Categories
Find more on GPU Computing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
