i need help about my code. i cant figure out what im doing wrong. here is the criterias i try to code (http://ift.tt/2oK0kHT) and data file ( http://ift.tt/2oRaCD4 ) so i code this for solve it. but code always say 'NS' and i want "regime" data respect my table. thx for all who try to help
data = xlsread('Data.xls');
PP=data(:,2);
TP=data(:,4);
BP=data(:,6);
region={ };
for i=1:length(data)
if PP(i)>=52 && 35>=TP(i);
region{i}='NF';
elseif 40<=PP(i) & PP(i)<52 & (TP(i)<=20);
region{i}='NS';
elseif (40>PP(i)) && (BP(i)>=45) && TP(i)<=20;
region{i}='SS';
elseif (PP(i)<=20) && (45<=BP(i)) && (TP(i)<=40);
region{i}='SS';
elseif (PP(i)<=20) && (40<=TP(i) && TP(i)<=52) ;
region{i}='TS';
elseif (PP(i) <=32) && (TP(i)>=52);
region{i}='NF';
else
region{i}='UN';
end
end
Aucun commentaire:
Enregistrer un commentaire