필터 지우기
필터 지우기

I want to rotate the properties fromi=201:600(x) and J=201:600.(Y) That is the properties inside the area inside this area should be rotated. Can someone please help me?

조회 수: 3 (최근 30일)
fid = fopen('moduli','r')
data = fread(fid, inf, 'single', 'ieee-be');
fclose(fid)
data = reshape(data,[800 800 3]);
for i=201,600
for j=201,600
end
end
figure(1)
pcolor(data(:,:,1))
axis tight;
shading interp;
colorbar;
set(gcf,'renderer','zbuffer')
print -dpng mod
  댓글 수: 2
Image Analyst
Image Analyst 2023년 1월 21일
YOu forgot to attach the 'moduli' file. And how can a property be rotated?
Vishnu Vannarath Rajan
Vishnu Vannarath Rajan 2023년 1월 21일
Thank you so much for the reply. I meant to rotate the area mentioned. Some properties are assigned inside this area and the properties will automatically be re-assigned if it has been rotated. Hereby attaching the compressed version of moduli.

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

답변 (1개)

Nehemiae
Nehemiae 2023년 3월 10일
Hello,
To rotate to rotate the submatrix of data, the “imrotate” function can be used. In the example below, the rotation is limited to the region of interest with the surrounding areas being set as 0, and the extruding areas being cropped. However, this can be configured by the “imrotate” options as per the requirement.
data(201 : 600, 201 : 600, 1) = imrotate(data(201 : 600, 201 : 600, 1), 45, "bilinear", "crop");
The documentation on the “imrotate” function (https://www.mathworks.com/help/images/ref/imrotate.html) is helpful in this regard.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by