I am new to MATLAB and i have this question regarding execel
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    raghavendra kandukuri
 am 6 Sep. 2018
  
    
    
    
    
    Bearbeitet: madhan ravi
      
      
 am 7 Sep. 2018
            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 Kommentare
Akzeptierte Antwort
  madhan ravi
      
      
 am 6 Sep. 2018
        
      Bearbeitet: madhan ravi
      
      
 am 6 Sep. 2018
  
      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 Kommentare
  madhan ravi
      
      
 am 7 Sep. 2018
				
      Bearbeitet: madhan ravi
      
      
 am 7 Sep. 2018
  
			@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.
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

