matlab Error:Missing variable or function.clear;clc;Cy=20;Ye=40;Mg=70;G=10;A=[Cy,Ye;G,Mg;Cy,Ye;Mg,G];Pix=repmat(A,32,64);V=eye(size(Pix));[m,n]=size(Pix);for N=1:1:63for k=1:1:63V(2N,4k+1)=Pix(2N,4k+1)+Pix(2N+,4k+1)+Pix(2N,4k)+Pix(2N+1,4k);end end im
来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 00:37:01
matlab Error:Missing variable or function.clear;clc;Cy=20;Ye=40;Mg=70;G=10;A=[Cy,Ye;G,Mg;Cy,Ye;Mg,G];Pix=repmat(A,32,64);V=eye(size(Pix));[m,n]=size(Pix);for N=1:1:63for k=1:1:63V(2N,4k+1)=Pix(2N,4k+1)+Pix(2N+,4k+1)+Pix(2N,4k)+Pix(2N+1,4k);end end im
matlab Error:Missing variable or function.
clear;
clc;
Cy=20;
Ye=40;
Mg=70;
G=10;
A=[Cy,Ye;G,Mg;Cy,Ye;Mg,G];
Pix=repmat(A,32,64);
V=eye(size(Pix));
[m,n]=size(Pix);
for N=1:1:63
for k=1:1:63
V(2N,4k+1)=Pix(2N,4k+1)+Pix(2N+,4k+1)+Pix(2N,4k)+Pix(2N+1,4k);
end
end
image(V);
try open('?Error:File:D:\Matlab7.0\work\tuxiang.m Line:13 Column:4
|
Error:Missing variable or function.
matlab Error:Missing variable or function.clear;clc;Cy=20;Ye=40;Mg=70;G=10;A=[Cy,Ye;G,Mg;Cy,Ye;Mg,G];Pix=repmat(A,32,64);V=eye(size(Pix));[m,n]=size(Pix);for N=1:1:63for k=1:1:63V(2N,4k+1)=Pix(2N,4k+1)+Pix(2N+,4k+1)+Pix(2N,4k)+Pix(2N+1,4k);end end im
首先2N应该写成2*N
还有就是你的pix的大小是128的,你想调用第129个下标,这也是一个错误!