How can you compare 2 values on excel and adding an excel formula in matlab?
2 ビュー (過去 30 日間)
古いコメントを表示
Hi guys, I'm going to compare values on excel but I'm trying to do it on MATLAB as there are so many values that needed to be compared. The values goes like this picture below:
i wanted to compare VarName1 (Awobetul.csv) with VarName7 (Awomanual.csv) I'm trying to use my own code but it doesn't work... it says:
if true
Q = importdata('Awobetul.csv');
W = importdata('Awomanual.csv');
counter = 0;
expandRange = 5;
saveHistory = 5;
lastHistory = zeros(5,4);
counterHistory = 0;
%saveResult = ['C:\Users\Kenny\Desktop\skripsi\pakebandingyangini\tikus\kencing.csv']; %char(folder1(1, listData)) hilang
%fid = fopen(saveResult, 'a');
%for n = 1:frameNum
for n = 1:size(Q.data, 1)
for m = 1:size(W.data, 7)
if Q.data(n, 1) == W.data(m, 7)
fprintf(fid, '%d, %f, %f, %f, %f, %d, %f, %f, %f, %f ', Q.data(n, 1), Q.data(n, 2), Q.data(n, 3), Q.data(n, 4), Q.data(n, 5), W.data(m, 1), W.data(m, 2), W.data(m, 3), W.data(m, 4), W.data(m, 5));
end
end
end
end
Attempt to reference field of non-structure array.
Error in bijikuda (line 15)
for m = 1:size(W.data, 7)
Here's my algorithm (what i wanted the program to show):
if VarName1(Awobetul.csv) is equal to VarName7 (Awomanual.csv)
then show VarName2 3 4 5(Awomanual.csv) and show Varname2 3 4 5(Awobetul.csv) next to it.
The values of the code will be written on a new .csv file
Thanks guys.
1 件のコメント
Weird Rando
2016 年 5 月 12 日
編集済み: Weird Rando
2016 年 5 月 12 日
for m = 1:size(W.data, 7)
An array that is 7 dimension??? double check the dimension.
I think you wanted number of rows in the 7 column
for m = 1:length(W.data(:,7))
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!