I am new to MATLAB and i have this question regarding execel
조회 수: 2 (최근 30일)
이전 댓글 표시
I have an excel, out of all columns, i want to do some math on column 3, where it should visit all the cells in column 3 and check if it is equal to zero, if it is then perform some calculation else perform this. for example:
if(DesiredFuel == 0) % DesiredFuel is the name of column 3
{
%
%
}
else
{
}
% Please find the excel attached
댓글 수: 0
채택된 답변
madhan ravi
2018년 9월 6일
편집: madhan ravi
2018년 9월 6일
Try this:
[num,txt,raw]=xlsread('exp2.xlsx')
DESIRED_FUEL = num(:,3)
for i = 1:numel(DESIRED_FUEL)
if DESIRED_FUEL(i)==0
%your calculation
else
end
end
댓글 수: 2
madhan ravi
2018년 9월 7일
편집: madhan ravi
2018년 9월 7일
@Raghavendra haven’t heard from you in a while if my answer is what you were looking then please accept my answer if not let know what’s more required.
추가 답변 (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!