comparing two excel files

조회 수: 9(최근 30일)
nur iman athilah
nur iman athilah 2021년 3월 8일
댓글: nur iman athilah 2021년 3월 11일
how can i compare two excel file that dont have same row number in order to get the similarity value? My file 'colon.xlsx' have approx 30 rows and another file 'COLONPOLYPS.xlsx' have only one row. I want to compare the colonpolyps file which have only 1 row with all 30 rows in colon file and get the similarities.
  댓글 수: 2
nur iman athilah
nur iman athilah 2021년 3월 8일
I've attach the files here. I want to check the similarities between these two files for the identical values.

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

답변(1개)

Monisha Nalluru
Monisha Nalluru 2021년 3월 11일
Use readmatrix, readtable, readcell methods to read the data from files
Once the data is present in workspace you can compare using Array Comparsion feature which gives the similar between two matrices i.e 1 when similar and 0 when not similar
As an example
colon=readmatrix('colon.xlsx');
colonpoly=readmatrix('COLONPOLYPS.xlsx');
comparsion=zeros(13,11); % result of comparsion is stored in this variable
for i=2:14 % looping from 2 because first row is heading
comparsion(i,:)= colon(i,:)==colonpoly(2,:);
end
  댓글 수: 3
nur iman athilah
nur iman athilah 2021년 3월 11일
im doing a Case-Based Reasoning for XAI colon polyps detection. I want to set the COLONPOLYPS.xslx as the query or new case. Then this new case need to be compared with the all data row by row from the data base which is in the colon.xslx. higher similarity is good. can refer to this link

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

Community Treasure Hunt

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

Start Hunting!

Translated by