how to subtract 2 cell array??
Mostrar comentarios más antiguos
im=imread('cameraman.tif');
im1=imread('cameraman.tif');
[wc,s] = wavedec2(im,3,'db1');
[ca,la] = wavedec2(im1,3,'db1');
[a,v,d,h]=swt2(im,3,'sym4');
[a1,v1,d1,h1]=swt2(im1,3,'sym4');
mean1=(a+a1)/2;
vout=blocksize(v);
dout=blocksize(d);
hout=blocksize(h);
v1out=blocksize(v1);
d1out=blocksize(d1);
h1out=blocksize(h1);
for x=1:3
for y=1:3
sumvout=vout(x,y);
sumdout=dout(x,y);
sumhout=hout(x,y);
sumv1out=v1out(x,y);
sumd1out=d1out(x,y);
sumh1out=h1out(x,y);
end
end
%calculate mean for host image
[m,n]=size(vout);
for i=1:m
for j=1:n
meanValues1 = cellfun(@(x) mean(x(:)),vout);
end
end
[m1,n1]=size(dout);
for i=1:m1
for j=1:n1
meanValues2 = cellfun(@(x) mean(x(:)),dout);
end
end
[m2,n2]=size(hout);
for i=1:m2
for j=1:n2
meanValues3 = cellfun(@(x) mean(x(:)),hout);
end
end
[m3,n3]=size(vout);
for i=1:m3
for j=1:n3
meanValues4 = cellfun(@(x) std(x(:)),vout);
end
end
- i have to subtract meanvalues3 from meanValues4.but i m getting error *
Respuestas (1)
Azzi Abdelmalek
el 3 de Mayo de 2014
a={1 2 3}
b={10 20 30}
c=cellfun(@(x,y) x-y,a,b)
3 comentarios
divi
el 3 de Mayo de 2014
Azzi Abdelmalek
el 3 de Mayo de 2014
Type
whos meanvalues3 meanValues4
What did you get?
divi
el 3 de Mayo de 2014
Editada: Azzi Abdelmalek
el 3 de Mayo de 2014
Categorías
Más información sobre Image Segmentation and Analysis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!