필터 지우기
필터 지우기

I am new to MATLAB and i have this question regarding execel

조회 수: 2 (최근 30일)
raghavendra kandukuri
raghavendra kandukuri 2018년 9월 6일
편집: madhan ravi 2018년 9월 7일
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

채택된 답변

madhan ravi
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
madhan ravi 2018년 9월 6일
is everything clear?
madhan ravi
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 CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by