Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Process Cells from Excel File
2 ビュー (過去 30 日間)
古いコメントを表示
Suppose I have a spreadsheet like this:
A B C
1: 0 45 87
2: 0 7 8
3: 1 65 68
4: 0 6 9
5: 1 0 9
I want to pick the value of cell in column C for the row in column A that has a value equal to 1. For example, read A3 and report/plot C3.
0 件のコメント
回答 (2 件)
Image Analyst
2012 年 9 月 26 日
Did you look at what xlsread() returns? I bet you can find what you want there. (untested code)
numbers = xlsread(yourFileName);
columnA = number(:,1);
for row = 1 : length(columnA)
if columnA
fprintf('The value of column C in row %d = %f', row, number(row, 3));
end
end
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!