フィルターのクリア

How do I compare the values ​​of a matrix?

1 回表示 (過去 30 日間)
HelpAStudent
HelpAStudent 2021 年 9 月 25 日
コメント済み: HelpAStudent 2021 年 9 月 26 日
Hi there, this is my really complex code. With the matrix named as meanbasket, wich is a matrix 21x7 I have to check when a values is repeted in another columns
%this is for find the correct folder in my disk
srcFile = dir('C:\Users\agnes\Pictures\POST PROCESSING 4\PP4 TGC-MED RD 100\*.dcm');
pathname = ('C:\Users\agnes\Pictures\POST PROCESSING 4\PP4 TGC-MED RD 100\');
% i'm defining the images
numberofimages = 21;
numberofroi = 7;
% I'm working on a reference images for finding some ROI, that will be need
% for create the matrix
I=dicomread('2');
imshow(I)
R = nan(numberofroi,4);
masks=cell(numberofroi,1);
for nr = 1:numberofroi
h = drawrectangle(gca); wait(h);
R(nr,:)=h.Position;
masks{nr}=h.createMask;
end
roibasket = cell(numberofroi,numberofimages);
meanbasket = nan(size(roibasket));
for ni = 1:numberofimages
for nr = 1:numberofroi
filename=(num2str(ni));
pileofimages=dicomread(strcat(pathname,filename));
info=dicominfo(strcat(pathname,filename));
roibasket{nr,ni} = imcrop(pileofimages,R(nr,:));
meanbasket(nr,ni) = mean( pileofimages(masks{nr}) ); %meanbasket is my 7 * 21 matrix, where the values ​​are the averages of the ROIs found earlier
%FROM NOW I DON'T KNOW HOW TO CONFRONT THE VALUES OF MY MATRIX
end
end
  2 件のコメント
Image Analyst
Image Analyst 2021 年 9 月 25 日
What do you mean by "CONFRONT" or "compare"?
HelpAStudent
HelpAStudent 2021 年 9 月 26 日
To check if the value of, for exemple, first row and column is the same of the value of the second row and third column

サインインしてコメントする。

回答 (1 件)

yanqi liu
yanqi liu 2021 年 9 月 26 日
may be use the diff from one to another, and compare

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by