How can I use repmat function for the following code?

I need to remove the for loop and I want use repmat for this code
Y= zeros(64,64);
load('brain512.mat')
X=data;
Z = imresize(X, [64 64]);
N=64;
m=64;
n=64;
for p=0:N-1
for q=0:N-1
for j=0:m-1
for k=0:n-1
Y(p+1,q+1) = Y(p+1,q+1)+exp(-2*pi*1i*p*j/m)*exp(-2*pi*1i*q*k/n)*Z(j+1,k+1);
end
end
end
end

댓글 수: 4

For some reason you removed all the comments in your code before you posted it (which I'm sure you had, like all good programmers do). So, explain in words what it does.
Akshay Khadse
Akshay Khadse 2018년 9월 10일
편집: Akshay Khadse 2018년 9월 10일
Please do mention the contents of 'brain512.mat'.
Hello Akshay, Thanks for commenting, I uploaded the file.
Regards Bhanu

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2018년 9월 7일

댓글:

2018년 9월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by