if statement with message display
Ältere Kommentare anzeigen
i want to make if statement and if this true printf this message and elseif do the same but when i try to use msgbox it doesn't work true and disp doesn't work
count1 = sum(data(:) >=0.8);
count2=sum(data(:)<0.8);
count3=sum(data(:)<=0.5);
count6=sum(data(:)<0.7 &data(:)>=0.6);
count7=sum(data(:)<0.8 & data(:)>=0.7);
if(count2>count1 && count3>count6 && count3>count7)
message1 = sprintf('This is sickle cell: %d',count3);
elseif (count2>count1 && count6>count3 && count6 >count7)
message1 = sprintf('This is elliptocytes cell: %d',count6);
elseif (count2>count1 && count7>count3 && count7 >count6);
message1 = sprintf('This is echinocytes cell: %d',count7);
end;
msgbox=({message1});
Akzeptierte Antwort
Weitere Antworten (1)
B.k Sumedha
am 16 Jun. 2015
Bearbeitet: B.k Sumedha
am 16 Jun. 2015
After each message1 put the msgbox.
U can just use
msgbox(message1);
5 Kommentare
menna gamal
am 16 Jun. 2015
B.k Sumedha
am 16 Jun. 2015
Bearbeitet: B.k Sumedha
am 16 Jun. 2015
Did u get any error?
menna gamal
am 16 Jun. 2015
menna gamal
am 16 Jun. 2015
menna gamal
am 16 Jun. 2015
Kategorien
Mehr zu Image Preview and Device Configuration finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!