have a excel file having (amplitude) data at each cell, that is being converted to a coloured image and when I select an area in the image, it should give back corresponding amplitude value.
8 views (last 30 days)
Show older comments
clc
clear
% take data frm xcl and look for selected area
Amp=xlsread('C:\Users\AMIT\Desktop\CB\excel\4\Cast Billet Amp Data-(4-5).xls');
Th=xlsread('C:\Users\AMIT\Desktop\CB\excel\4\Cast Billet thickness Data-(4-5).xls');
Z=Amp(2:1:514,2:1:256);
T=Th(2:1:514,2:1:256);

for i=1:1:513
for j=1:1:255
if ((Z(i,j)>=80) && (Z(i,j)<=100)) % selecting high amp regions
A(i,j)=Z(i,j);
B(i,j)=T(i,j);
else
A(i,j)=0;
B(i,j)=0;
end
end
end
for i=1:1:513
for j=125:1:225
C(i,j)= A(i,j);
D(i,j)= B(i,j);
end
end
axes('FontSize',20);
image(A');figure
axes('FontSize',20);
imagesc(B');figure
for i=1:1:513
for j=125:1:225
if B(i,j)>=6.5 && B(i,j)<=7.0
A4(i,j)=C(i,j);
else
A4(i,j)=0;
end
end
end
axes('FontSize',20);
%imagesc(Y,X,A4');figure
imagesc(A4');figure
ylim([120 225])
% I'll select an area of red region then I should get the amplitude values ..
0 Comments
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!