我是编程新手,在简化代码时遇到了一些问题。我对前面的部分没有问题,只需要知道如何简化这段代码。我希望下面的代码也可以在“11”的位置绘制 12、18、20、27 和 28。我将不胜感激任何帮助!
simrecno1inds11 = nonzero(datasim11[:,1]==no1)[0]
simrecno2inds11 = nonzero(datasim11[:,1]==no2)[0]
simrecno3inds11 = nonzero(datasim11[:,1]==no3)[0]
simrecno4inds11 = nonzero(datasim11[:,1]==no4)[0]
simrecno5inds11 = nonzero(datasim11[:,1]==no5)[0]
simrecno7inds11 = nonzero(datasim11[:,1]==no7)[0]
simrecno8inds11 = nonzero(datasim11[:,1]==no8)[0]
simrecno9inds11 = nonzero(datasim11[:,1]==no9)[0]
simrecno10inds11 = nonzero(datasim11[:,1]==no10)[0]
simrecno11inds11 = nonzero(datasim11[:,1]==no11)[0]
simrecno12inds11 = nonzero(datasim11[:,1]==no12)[0]
simrecno13inds11 = nonzero(datasim11[:,1]==no13)[0]
simrecno14inds11 = nonzero(datasim11[:,1]==no14)[0]
simrecno15inds11 = nonzero(datasim11[:,1]==no15)[0]
simrecno16inds11 = nonzero(datasim11[:,1]==no16)[0]
simrecno17inds11 = nonzero(datasim11[:,1]==no17)[0]
simrecno18inds11 = nonzero(datasim11[:,1]==no18)[0]
simrecno19inds11 = nonzero(datasim11[:,1]==no19)[0]
simrecno20inds11 = nonzero(datasim11[:,1]==no20)[0]
simrecno21inds11 = nonzero(datasim11[:,1]==no21)[0]
simrecno22inds11 = nonzero(datasim11[:,1]==no22)[0]
simrecno23inds11 = nonzero(datasim11[:,1]==no23)[0]
simrecno24inds11 = nonzero(datasim11[:,1]==no24)[0]
simrecno25inds11 = nonzero(datasim11[:,1]==no25)[0]
simrecno26inds11 = nonzero(datasim11[:,1]==no26)[0]
simrecno27inds11 = nonzero(datasim11[:,1]==no27)[0]
simrecno28inds11 = nonzero(datasim11[:,1]==no28)[0]
simrecno29inds11 = nonzero(datasim11[:,1]==no29)[0]
simrecno30inds11 = nonzero(datasim11[:,1]==no30)[0]
recno1inds11 = nonzero(data11[:,1]==no1)[0]
recno2inds11 = nonzero(data11[:,1]==no2)[0]
recno3inds11 = nonzero(data11[:,1]==no3)[0]
recno4inds11 = nonzero(data11[:,1]==no4)[0]
recno5inds11 = nonzero(data11[:,1]==no5)[0]
recno7inds11 = nonzero(data11[:,1]==no7)[0]
recno8inds11 = nonzero(data11[:,1]==no8)[0]
recno9inds11 = nonzero(data11[:,1]==no9)[0]
recno10inds11 = nonzero(data11[:,1]==no10)[0]
recno11inds11 = nonzero(data11[:,1]==no11)[0]
recno12inds11 = nonzero(data11[:,1]==no12)[0]
recno13inds11 = nonzero(data11[:,1]==no13)[0]
recno14inds11 = nonzero(data11[:,1]==no14)[0]
recno15inds11 = nonzero(data11[:,1]==no15)[0]
recno16inds11 = nonzero(data11[:,1]==no16)[0]
recno17inds11 = nonzero(data11[:,1]==no17)[0]
recno18inds11 = nonzero(data11[:,1]==no18)[0]
recno19inds11 = nonzero(data11[:,1]==no19)[0]
recno20inds11 = nonzero(data11[:,1]==no20)[0]
recno21inds11 = nonzero(data11[:,1]==no21)[0]
recno22inds11 = nonzero(data11[:,1]==no22)[0]
recno23inds11 = nonzero(data11[:,1]==no23)[0]
recno24inds11 = nonzero(data11[:,1]==no24)[0]
recno25inds11 = nonzero(data11[:,1]==no25)[0]
recno26inds11 = nonzero(data11[:,1]==no26)[0]
recno27inds11 = nonzero(data11[:,1]==no27)[0]
recno28inds11 = nonzero(data11[:,1]==no28)[0]
recno29inds11 = nonzero(data11[:,1]==no29)[0]
recno30inds11 = nonzero(data11[:,1]==no30)[0]