Info
This question is closed. Reopen it to edit or answer.
How to remove this error??
1 view (last 30 days)
Show older comments
here is my code
function [B C] image_comparison1 (H,D)
H=imread('n.jpg');
H=double(rgb2gray(H));
[m,n] = size(H);
D=imread('9.jpg');
D=double(rgb2gray(D));
[r,c]=size(D);
if m<r
B = zeros(r,c);
B=H;
else if r<m
C = zeros(m,n);
C=D;
end
end
4 Comments
Jan
on 15 May 2017
What is the purpose of the code?
B = zeros(r,c); % Useless, is overwritten directly:
B=H;
If m==r the code fails, because B and C are not created.
Cam Salzberger
on 15 May 2017
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!