Attach a CSV file so we can get started helping you. In the meantime, you probably want to do something like
numRows = height(t);
patient_outcome = false(numRows, 1);
for row = 1 : numRows
if (chest_pain_type(row)>3) &&&& (serum_cholestoral(row)>0) && (st_depression(row)>0.8) && (gender(row)>0)
patient_outcome(row) = true;
elseif (chest_pain_type(row)>3) && (serum_cholestoral(row)>0) && (st_depression(row)>0.8) && (gender(row)<=0) && (heart_condition(row)>3)
patient_outcome(row) = true;
elseif (chest_pain_type(row)>3) && (serum_cholestora(row)l>0) && (st_depression(row)>0.8) && (gender(row)<=0) && (heart_condition(row)<=3) && (exercise_induced_angina(row)>0)
patient_outcome(row) = false;
end
end
3 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/671833-loop-through-matlab-vector#comment_1179673
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/671833-loop-through-matlab-vector#comment_1179673
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/671833-loop-through-matlab-vector#comment_1179903
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/671833-loop-through-matlab-vector#comment_1179903
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/671833-loop-through-matlab-vector#comment_1180073
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/671833-loop-through-matlab-vector#comment_1180073
Sign in to comment.