I have the following if statements:
if struct_idx == 1 + 4*n % where n is an integer equal to or greater than zero
measurement_data(struct_idx).unit = 'SD1';elseif struct_idx == 2 + 4*n % where n is an integer equal to or greater than zero measurement_data(struct_idx).unit = 'SD2';elseif struct_idx == 3 + 4*n % where n is an integer equal to or greater than zero measurement_data(struct_idx).unit = 'SD3';else struct_idx == 4 + 4*n % where n is an integer equal to or greater than zero measurement_data(struct_idx).unit = 'SD4';end
How can I turn the commented parts into working code?
Best Answer